回答
列表
错误1:
TypeError: Input 'split_dim' of 'Split' Op has type float32 that does not match expected type of int32.
来自:x = tf.split(0, n_chunks, x)
到:x = tf.split(axis=0, num_or_size_splits=n_chunks, value=x)
错误2:
AttributeError: module 'tensorflow.contrib.rnn.python.ops.rnn_cell' has no attribute 'BasicLSTMCell'
来自:
from tensorflow.contrib.rnn.python.ops import rnn_cell
lstm_cell = rnn_cell.BasicLSTMCell(rnn_size,state_is_tuple=True)
到:
from tensorflow.contrib.rnn import BasicLSTMCell
lstm_cell = BasicLSTMCell(rnn_size,state_is_tuple=True)
错误3:
NameError: name 'rnn' is not defined
来自:outputs, states = rnn.rnn(lstm_cell, x, dtype=tf.float32)
到:outputs, states = tf.nn.dynamic_rnn(cell=lstm_cell, inputs=x, dtype=tf.float32)
错误4:
ValueError: Dimension must be 2 but is 3 for 'transpose_3' (op: 'Transpose') with input shapes: [?,28], [3].
评论:
x = tf.transpose(x, [1,0,2]) x = tf.reshape(x, [-1, chunk_size]) x = tf.split(axis=0, num_or_size_splits=n_chunks, value=x)
错误5:
ValueError: Only call
softmax_cross_entropy_with_logits
with named arguments (labels=..., logits=..., ...)
来源:
cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(prediction,y))
要:
cost = tf.reduce_mean(tf.nn.softmax_cross_entropy_with_logits(logits=prediction,labels=y))
错误6:
InvalidArgumentError: logits and labels must be same size: logits_size=[28,10] labels_size=[128,10]
这是一个也许概念问题与softmax_cross_entropy_with_logits
功能。看看:softmax_cross_entropy_with_logits和doc
开始理解和解决所有这些问题。如果仍然无法运行代码,请返回并发布更新后的代码,但至少需要解决6个问题:)
- 1. 当我在pl/sql developer中执行以下代码时,它会引发错误?
- 2. 当我执行下面的代码时,它会给我上面的错误?
- 3. 当我运行以下SQL代码时显示此错误?我试图解决由子查询
- 4. 在我的代码中显示图像时找不到错误
- 5. 我收到以下错误,同时运行我的代码
- 6. vb.net当我建立它显示0错误,但当我执行它引发此错误
- 7. 我试图执行我的android代码模拟器初始化耗时过长,但没有显示设备在事件日志错误中显示错误
- 8. 以下代码显示分段错误
- 9. 运行时错误我的代码sigsegv
- 10. RNN-LSTM时间序列Tensorflow 0.12错误
- 11. 当我运行我的代码时出现NaN错误
- 12. 当我试图运行代码然后出现错误消息
- 13. 当我尝试运行此代码时,出现语法错误
- 14. 当我试图运行呈现以下错误消息
- 15. GroupLayout错误:在我的代码中找不到错误的行
- 16. 当我运行耙测试时minitest错误没有显示
- 17. 错误,当我执行执行syncdb
- 18. 尝试创建CA原子列表时,执行以下代码时出现以下错误“关键错误CA”
- 19. 错误在我的代码
- 20. 错误在我的代码
- 21. 错误在我的代码
- 22. 当我调用Startactivity(i)显示错误(见下文)我的代码是意图我=新的意图(getApplicationContext(),NewRecipe.class);
- 23. 我试图执行以下查询,但它总是会报告错误
- 24. 尝试运行我的应用程序时出现以下错误。源代码中没有错误
- 25. 当我发布它时,Visual Studio错误中的AssemblyName错误
- 26. 当我在jenkins中运行时显示gradle错误
- 27. 当我尝试显示对话框时,它给了我FORCE CLOSE错误
- 28. 当我运行我的代码,我得到这个错误
- 29. 当我试图在SQL中进行散列时出现错误
- 30. 我试图在我的天气应用程序中实现AsyncTask。它显示以下错误String weatherString = QueryYahooWeather();
错误是什么? – gdelab
不要在此共享文件。请添加代码。 –