-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
I don't understand the code below. I have two question
1.why do this operation : x[0, -1] = imgs[0]
imgs[0] Represents actual number of frames?
I think that imgs[0] is the first predicted frame by T(transition) function, why Assign imgs[0] to x[0,-1]
- What does this operation mean?
what's the different between video[:, 0] and video[:,1]
video = video.reshape((batch_size, 2, 80, 160, 3))
return video[:, 0], video[:, 1]
here is code : --------------------------
def sampler(z, x):
video = np.zeros((128, 80, 160, 3))
print "Sampling..."
for i in range(128):
print i
x = x.reshape((-1, 80, 160, 3))
code = sess.run([E(I)[0]], feed_dict={I: x, K.learning_phase(): 1})[0]
code = code.reshape((batch_size, time+out_leng, z_dim))
inp = code[:, :time]
outs = T.predict(inp, batch_size=batch_size)
# imgs = G.predict(out, batch_size=batch_size)
imgs = sess.run([G_dec], feed_dict={out: outs, K.learning_phase(): 1})[0]
video[i] = imgs[0]
x = x.reshape((batch_size, time+out_leng, 80, 160, 3))
x[0, :-1] = x[0, 1:]
x[0, -1] = imgs[0]
video = video.reshape((batch_size, 2, 80, 160, 3))
return video[:, 0], video[:, 1]
Metadata
Metadata
Assignees
Labels
No labels