We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 890152f commit f6351deCopy full SHA for f6351de
src/reward_preprocessing/interpret.py
@@ -290,10 +290,7 @@ def param_f():
290
)
291
# Now, we put the latent vector thru the generator to produce transition
292
# tensors that we can get observations, actions, etc out of
293
- assert opt_latent.shape[1] == 1
294
- assert opt_latent.shape[2] == 1
295
- squeeze_shape = [opt_latent.shape[0], opt_latent.shape[3]]
296
- opt_latent = opt_latent.reshape(squeeze_shape)
+ opt_latent = np.squeeze(opt_latent, axis=(1, 2))
297
# ^ squeeze out extraneous "height" and "width" dimensions
298
opt_latent_th = th.from_numpy(opt_latent).to(th.device(device))
299
opt_transitions = gan.generator(opt_latent_th)
0 commit comments