for i in range(iter_time):
for step in range(len(batch_index)-1):
_,loss_=sess.run([train_op,loss], feed_dict={X:train_x[batch_index[step]:batch_index[step+1]], Y:train_y[batch_index[step]:batch_index[step+1]]})
if i % 100 == 0:
print('iter:',i,'loss:',loss_)
其中train_x[batch_index[step]:batch_index[step+1]]
是形状为(80, 15, 44)
的列表。我试图将train_x
转换为np.array
,但它仍无效。