LSTM:关于 7-RNN_Classifier_example.py 中数据序列化的问题?
作者: rosefun创建于 2018年4月27日更新于 2018年4月27日
Now, the dataset X={x1,x2,x3...,xn}, shape=[n,m], x1,x2,...,xn are samples of X. And the label data y.shape=[n,k]
If I use a time window with length of 2, then after reshape: X= tf.reshape(X,[int(n/2), 2, m]) X.shape=[n/2,m]
But I have a problem in getting the cost by formula, cost_rnn = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=y_, labels=y)) because both X and y have different shapes.
内容来源: MorvanZhou/tutorials