dougsm / ggcnn

Generative Grasping CNN from "Closing the Loop for Robotic Grasping: A Real-time, Generative Grasp Synthesis Approach" (RSS 2018)
BSD 3-Clause "New" or "Revised" License
484 stars 138 forks source link

some mistakes of this code #11

Closed Yanxing-Shi closed 5 years ago

Yanxing-Shi commented 5 years ago

First,I‘m very interested in this paper,and I want to implement this experiment,But,I come up with this problem.

python train_ggcnn.py
Using TensorFlow backend.
Traceback (most recent call last):
  File "train_ggcnn.py", line 91, in <module>
    x = Conv2D(no_filters[0], kernel_size=filter_sizes[0], strides=(3, 3), padding='same', activation='relu')(input_layer)
  File "/home/user/anaconda3/envs/tensorflow-py2/lib/python2.7/site-packages/keras/engine/base_layer.py", line 414, in __call__
    self.assert_input_compatibility(inputs)
  File "/home/user/anaconda3/envs/tensorflow-py2/lib/python2.7/site-packages/keras/engine/base_layer.py", line 311, in assert_input_compatibility
    str(K.ndim(x)))
ValueError: Input 0 is incompatible with layer conv2d_1: expected ndim=4, found ndim=2

please help me out

dougsm commented 5 years ago

Hi, thanks for the interest! Judging by the error it looks like you might be passing the wrong sized array to the network. If you're having issues I'd first recommend having a look at the new (as of yesterday) version that I pushed. It's written in PyTorch rather than Keras, but should be a lot more user friendly and is better documented.