Skip to content

Commit 890152f

Browse files
committed
Add asserts to check we don't get in trouble
1 parent d64ff57 commit 890152f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/reward_preprocessing/interpret.py

+2
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,8 @@ def param_f():
290290
)
291291
# Now, we put the latent vector thru the generator to produce transition
292292
# tensors that we can get observations, actions, etc out of
293+
assert opt_latent.shape[1] == 1
294+
assert opt_latent.shape[2] == 1
293295
squeeze_shape = [opt_latent.shape[0], opt_latent.shape[3]]
294296
opt_latent = opt_latent.reshape(squeeze_shape)
295297
# ^ squeeze out extraneous "height" and "width" dimensions

0 commit comments

Comments
 (0)