charlesq34 / pointnet

PointNet: Deep Learning on Point Sets for 3D Classification and Segmentation
Other
4.73k stars 1.45k forks source link

ValueError: Cannot feed value of shape (32, 0) for Tensor u'Placeholder_1:0', which has shape '(32,)' #85

Closed brucejunlee closed 6 years ago

brucejunlee commented 6 years ago

Dear Charles, There are some problems when I perform the classification task using my own data. Can you tell me what's wrong?

Traceback (most recent call last):
  File "train.py", line 260, in <module>
    train()
  File "train.py", line 161, in train
    train_one_epoch(sess, ops, train_writer)
  File "train.py", line 204, in train_one_epoch
    ops['train_op'], ops['loss'], ops['pred']], feed_dict=feed_dict)
  File "/Users/brucelee/miniconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 889, in run
    run_metadata_ptr)
  File "/Users/brucelee/miniconda2/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1096, in _run
    % (np_val.shape, subfeed_t.name, str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (32, 0) for Tensor u'Placeholder_1:0', which has shape '(32,)'
themmes commented 6 years ago

The tensor you are feeding has a different dimension (32,0) then expected (32,). You can apply np.squeeze to remove this dimension. https://docs.scipy.org/doc/numpy/reference/generated/numpy.squeeze.html

Flock1 commented 5 years ago

Hey,

I am getting the following error: ValueError: Cannot feed value of shape (8,) for Tensor 'Placeholder_1:0', which has shape '(?, 1)'

What should I do here?

D-Niermann commented 5 years ago

you need to expand the dimension of your (8,) array with np.expand_dims(). np.expand_dims(array,1) So that the array has dimension (8,1).

thirdlastletter commented 5 years ago

Hi, I get the error ValueError: Cannot feed value of shape (1,) for Tensor u'Placeholder:0', which has shape '(1,908)'` I am not sure how to fix this. Can anyone help?

thirdlastletter commented 5 years ago

@D-Niermann where would I need to add that? in sessions.py or in the train.py/batch_interference.py code?

utpal0401 commented 4 years ago

Hello, i get similar error ValueError: Cannot feed value of shape (50, 397) for Tensor 'Placeholder_1:0', which has shape '(?, 253)'