DeepBrainAI / ERD

24 stars 15 forks source link

You must feed a value for placeholder tensor 'topics' with dtype float and shape [?,100] #3

Open shaodiandian123 opened 4 years ago

shaodiandian123 commented 4 years ago

excuse me,I successfully train a df_model but get errors while training next

2020-03-30 16:38:43 Loading data ... 2 data loaded 2020-03-30 16:46:02 Data loaded. 2020-03-30 16:46:39.440410: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 300 100 100 100 2 2 df_saved\model is restored.

File "main.py", line 138, in FLAGS.max_sent_len, FLAGS.class_num, FLAGS.action_num) File "model.py", line 10, in init self.init_states = tf.placeholder(tf.float32, [None, hidden_dim], name="topics")

tensorflow.python.framework.errors_impl.InvalidArgumentError: You must feed a value for placeholder tensor 'topics' with dtype float and shape [?,100] [[{{node topics}}]]

So how can I run the code correctly?

Thank you.

qwerfdsaplking commented 4 years ago

Hey, guys, have you notice the cost function (y_i - a_i)^2 in page 5 of the paper? As far as I know, if the authors are using DQN algorithm, the a_i should be replaced by action-value function Q(h_i, a, theta). In my understand, the a_i is the action value, so I am confused why they use (y_i-a_i)^2 as cost function.