resnet icon indicating copy to clipboard operation
resnet copied to clipboard

ValueError: Input 0 is incompatible with layer flatten_2: expected min_ndim=3, found ndim=2

Open liningxiao opened this issue 7 years ago • 1 comments

Total memory: 7.92GiB Free memory: 7.28GiB 2017-12-07 14:19:22.480859: I tensorflow/core/common_runtime/gpu/gpu_device.cc:976] DMA: 0 2017-12-07 14:19:22.480867: I tensorflow/core/common_runtime/gpu/gpu_device.cc:986] 0: Y 2017-12-07 14:19:22.480876: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1045] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 1070, pci bus id: 0000:02:00.0) Model loaded. Traceback (most recent call last): File "finetune_inceptionv3.py", line 38, in top_model.add(Flatten(input_shape=base_model.output_shape[1:])) File "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 464, in add layer(x) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 559, in call self.assert_input_compatibility(inputs) File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 474, in assert_input_compatibility str(K.ndim(x))) ValueError: Input 0 is incompatible with layer flatten_2: expected min_ndim=3, found ndim=2

what problem happen?

liningxiao avatar Dec 07 '17 06:12 liningxiao

@liningxiao i can't import the resnet.ImportError: No module named resnet Do you meet this question? thanks

alyato avatar Aug 03 '18 15:08 alyato