Skip to content

Commit

Permalink
Fix a bug in temporal shortcut (#20)
Browse files Browse the repository at this point in the history
Temporal tensors are 5D, including a temporal axis at axis=1
  • Loading branch information
JihongJu authored and 0x00b1 committed Jun 19, 2017
1 parent 7fe7e01 commit 7411f28
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions keras_resnet/block/temporal.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def f(x):


def _shortcut(a, b):
a_shape = keras.backend.int_shape(a)
b_shape = keras.backend.int_shape(b)
a_shape = keras.backend.int_shape(a)[1:]
b_shape = keras.backend.int_shape(b)[1:]

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

0 comments on commit 7411f28

Please sign in to comment.