Closed 10010Naoteng closed 2 years ago
I have the same issue.
Could you share your TF version? haven't tested with the latests versions. Might be that the resnet50V2
has changed in behaviour
My TF version is 2.8.0 and I have this issue too.
I was change TF version to 2.6.0, get the error: ValueError: Dimension 1 in both shapes must be equal, but are 112 and 115. Shapes are [1,112,112,64] and [1,115,115,64]. cause by resnet50V2
I was change TF version to 2.4.0, It works.
building model...
Traceback (most recent call last): File "demo.py", line 53, in
model = Model()
File "D:\MyPcSoftware\ProgramDesign\Anaconda\Program\DRL\imitation_action\hmr2.0-master\src\main\model.py", line 65, in init
self._build_model()
File "D:\MyPcSoftware\ProgramDesign\Anaconda\Program\DRL\imitation_action\hmr2.0-master\src\main\model.py", line 78, in _build_model
self.generator.build(input_shape=gen_input)
File "D:\MyPcSoftware\ProgramDesign\Anaconda\data\envs\imitating\lib\site-packages\keras\engine\training.py", line 440, in build
self.call(x, kwargs)
File "D:\MyPcSoftware\ProgramDesign\Anaconda\Program\DRL\imitation_action\hmr2.0-master\src\main\generator.py", line 91, in call
features = self.resnet50V2(inputs, kwargs)
File "D:\MyPcSoftware\ProgramDesign\Anaconda\data\envs\imitating\lib\site-packages\keras\utils\traceback_utils.py", line 67, in error_handler
raise e.with_traceback(filtered_tb) from None
File "D:\MyPcSoftware\ProgramDesign\Anaconda\data\envs\imitating\lib\site-packages\tensorflow\python\framework\ops.py", line 1939, in _create_c_op
raise ValueError(e.message)
ValueError: Exception encountered when calling layer "conv2_block1_out" (type Add).
Dimensions must be equal, but are 59 and 61 for '{{node resnet50v2/conv2_block1_out/add}} = AddV2[T=DT_FLOAT](resnet50v2/conv2_block1_0_conv/BiasAdd, resnet50v2/conv2_block1_3_conv/BiasAdd)' with input shapes: [1,59,59,256], [1,61,61,256].
Call arguments received: • inputs=['tf.Tensor(shape=(1, 59, 59, 256), dtype=float32)', 'tf.Tensor(shape=(1, 61, 61, 256), dtype=float32)']