我有一个Tensorflow代码,可以很好地与python 2配合使用。我需要切换到Python3。此外,进行一些小的更改,这是我遇到的大错误。造成输入送纸错误的原因。
Traceback (most recent call last):
File "main.py", line 530, in <module>
train(config)
File "main.py", line 337, in train
loss,train_op = trainer.step(sess,batch)
File "trainer.py", line 33, in step
loss, train_op = sess.run([self.loss,self.train_op],feed_dict=feed_dict)
File "anaconda2/envs/tf_gpu/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 905, in run
run_metadata_ptr)
File "anaconda2/envs/tf_gpu/lib/python3.6/site-packages/tensorflow/python/client/session.py", line 1116, in _run
str(subfeed_t.get_shape())))
ValueError: Cannot feed value of shape (0,) for Tensor 'simple_lstm/pre_emb_mat:0', which has shape '(?, 100)'
我该如何解决?