Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit d523bce

Browse files
Fix #55 by using tf.placeholder_with_default to forget tensor shapes.
1 parent 13e5dd9 commit d523bce

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lucid/modelzoo/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ def load_graphdef(model_url, reset_device=True):
3434

3535
def forget_xy(t):
3636
"""Forget sizes of dimensions [1, 2] of a 4d tensor."""
37-
zero = tf.identity(0)
38-
return t[:, zero:, zero:, :]
37+
shape = (t.shape[0], None, None, t.shape[3])
38+
return tf.placeholder_with_default(t, shape)

0 commit comments

Comments
 (0)