pointnet2 icon indicating copy to clipboard operation
pointnet2 copied to clipboard

tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed>

Open emtelGNR opened this issue 5 years ago • 6 comments

when I run python train.py: Traceback (most recent call last): File "train.py", line 284, in train() File "train.py", line 160, in train sess.run(init) File "/home/gnss/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 789, in run run_metadata_ptr) File "/home/gnss/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 997, in _run feed_dict_string, options, run_metadata) File "/home/gnss/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1132, in _do_run target_list, options, run_metadata) File "/home/gnss/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1152, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed>

Anyone knows that? thanks a lot !!!

emtelGNR avatar Nov 08 '19 11:11 emtelGNR

Encountered the same problem, Audios_tf = tf.placeholder(tf.float32, shape=[batch_size, None], name='1_input') Preds_th, loss_th = sess.run((preds, loss), feed_dict={labels_tf: np.array(y_test), audios_tf: np.array(audios_np)}) Traceback (most recent call last): File "TRY.py", line 173, in audios_tf : np.array(audios_np)}) File "/home/fan/anaconda3/envs/tf_asr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 929, in run run_metadata_ptr) File "/home/fan/anaconda3/envs/tf_asr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File "/home/fan/anaconda3/envs/tf_asr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run run_metadata) File "/home/fan/anaconda3/envs/tf_asr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed> Have you solved it?

Fansgithub2019 avatar Nov 17 '19 13:11 Fansgithub2019

Encountered the same problem, Audios_tf = tf.placeholder(tf.float32, shape=[batch_size, None], name='1_input') Preds_th, loss_th = sess.run((preds, loss), feed_dict={labels_tf: np.array(y_test), audios_tf: np.array(audios_np)}) Traceback (most recent call last): File "TRY.py", line 173, in audios_tf : np.array(audios_np)}) File "/home/fan/anaconda3/envs/tf_asr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 929, in run run_metadata_ptr) File "/home/fan/anaconda3/envs/tf_asr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1152, in _run feed_dict_tensor, options, run_metadata) File "/home/fan/anaconda3/envs/tf_asr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1328, in _do_run run_metadata) File "/home/fan/anaconda3/envs/tf_asr/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1348, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed> Have you solved it?

Sorry,not yet

emtelGNR avatar Nov 17 '19 14:11 emtelGNR

I solved it. In sess, the normalized place went wrong. mean, var = tf.nn.moments(m, axes=[2]) leads to tf.nn.batch_normalization(x=m, mean=mean, variance =var, offset=shift, scale=scale, variance_epsilon=0) The data does not correspond (the number of digits is different) and cannot be calculated. It needs to be changed to mean, var = tf.nn.moments(m, axes=[0,1, 2]), it is solved.

Fansgithub2019 avatar Nov 19 '19 00:11 Fansgithub2019

I solved it. In sess, the normalized place went wrong. mean, var = tf.nn.moments(m, axes=[2]) leads to tf.nn.batch_normalization(x=m, mean=mean, variance =var, offset=shift, scale=scale, variance_epsilon=0) The data does not correspond (the number of digits is different) and cannot be calculated. It needs to be changed to mean, var = tf.nn.moments(m, axes=[0,1, 2]), it is solved.

Do you mean I need to change the dims there? moments_dims, webwxgetmsgimg

emtelGNR avatar Jan 08 '20 08:01 emtelGNR

I solved it. In sess, the normalized place went wrong. mean, var = tf.nn.moments(m, axes=[2]) leads to tf.nn.batch_normalization(x=m, mean=mean, variance =var, offset=shift, scale=scale, variance_epsilon=0) The data does not correspond (the number of digits is different) and cannot be calculated. It needs to be changed to mean, var = tf.nn.moments(m, axes=[0,1, 2]), it is solved.

Do you mean I need to change the dims there? moments_dims, webwxgetmsgimg

Hi, I have met the same problem, have you solved it?

xiedotscene avatar Jul 21 '20 15:07 xiedotscene

when I run python train.py: Traceback (most recent call last): File "train.py", line 284, in train() File "train.py", line 160, in train sess.run(init) File "/home/gnss/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 789, in run run_metadata_ptr) File "/home/gnss/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 997, in _run feed_dict_string, options, run_metadata) File "/home/gnss/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1132, in _do_run target_list, options, run_metadata) File "/home/gnss/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1152, in _do_call raise type(e)(node_def, op, message) tensorflow.python.framework.errors_impl.InvalidArgumentError: <exception str() failed>

Anyone knows that? thanks a lot !!!

if you are sure the error happend in sess.run(init), please double check the file path

szkang1990 avatar Apr 20 '21 08:04 szkang1990