I am trying to implement ResNet 101 for video classification by following the code from https://gist.github.com/flyyufelix/65018873f8cb2bbe95f429c474aa1294
Tf version - 1.14.0
Input size - 256 frames X 80 X 60 X 1
I am not able to understand how to give inputs to this model and not able to resolve this error:
Image - >
TypeError Traceback (most recent call last)
<ipython-input-147-9d112a71e8b5> in <module>
10 #cnn = c3d_model(32)
11
---> 12 cnn = resnet101_model()
13 model = cnn
<ipython-input-137-14cd7725e66f> in resnet101_model(weights_path)
19 x = MaxPooling2D((3, 3), strides=(2, 2), name='pool1')(x)
20
---> 21 x = conv_block(x, 3, [64, 64, 256], stage=2, block='a', strides=(1, 1))
22 x = identity_block(x, 3, [64, 64, 256], stage=2, block='b')
23 x = identity_block(x, 3, [64, 64, 256], stage=2, block='c')
<ipython-input-133-bbe3e4d0fcf7> in conv_block(input_tensor, kernel_size, filters, stage, block, strides)
31
32 #x = x.add([x, shortcut], mode='sum', name='res' + str(stage) + block)
---> 33 x = keras.layers.merge.Add([x, shortcut], mode='sum', name='res' + str(stage) + block)
34 x = Activation('relu', name='res' + str(stage) + block + '_relu')(x)
35 return x
TypeError: __init__() takes 1 positional argument but 2 were given
[2] After applying the x = keras.layers.merge.Add([x, shortcut]), error is: https://i.stack.imgur.com/gcFRG.png
question from:
https://stackoverflow.com/questions/65933290/implementation-of-resnet-101-not-possible 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…