From 7411f28a5baceddd2cc67a3cc58efb734d27799e Mon Sep 17 00:00:00 2001 From: JihongJu Date: Mon, 19 Jun 2017 22:02:16 +0200 Subject: [PATCH] Fix a bug in temporal shortcut (#20) Temporal tensors are 5D, including a temporal axis at axis=1 --- keras_resnet/block/temporal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keras_resnet/block/temporal.py b/keras_resnet/block/temporal.py index 99036e9..86b907b 100644 --- a/keras_resnet/block/temporal.py +++ b/keras_resnet/block/temporal.py @@ -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]))