Skip to content

Commit 7411f28

Browse files
JihongJu0x00b1
authored andcommitted
Fix a bug in temporal shortcut (#20)
Temporal tensors are 5D, including a temporal axis at axis=1
1 parent 7fe7e01 commit 7411f28

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

keras_resnet/block/temporal.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ def f(x):
9898

9999

100100
def _shortcut(a, b):
101-
a_shape = keras.backend.int_shape(a)
102-
b_shape = keras.backend.int_shape(b)
101+
a_shape = keras.backend.int_shape(a)[1:]
102+
b_shape = keras.backend.int_shape(b)[1:]
103103

104104
if keras.backend.image_data_format() == "channels_last":
105105
x = int(round(a_shape[1] // b_shape[1]))

0 commit comments

Comments
 (0)