【问题标题】:TensorFlow install error with Anaconda using Python 3.5 (Windows 10)TensorFlow 使用 Python 3.5 (Windows 10) 安装 Anaconda 时出错
【发布时间】:2017-03-15 13:31:03
【问题描述】:

我正在使用 Python 3.5,并使用 Anaconda 在 Windows 10 中安装了 TensorFlow。
我收到以下错误:

; TypeError:“模块”对象不可调用

File "D:/Thèse1/LSTM/code/code_python/LSTM-Human-Activity-Recognition-master/lstm.py", line 114, in LSTM_Network

outputs, _ = tf.contrib.rnn(lsmt_layers, feature_mat, dtype=tf.float32)   TypeError: 'module' object is not callable

【问题讨论】:

  • 请重新整理您的问题,使其更具可读性。您应该报告您想要获取的内容、尝试的内容以及遇到的错误。
  • tf.contrib.rnn 是一个模块,错误消息有助于指出。

标签: python-3.x tensorflow


【解决方案1】:

你得到一个错误,因为你试图调用一个模块对象作为一个函数。特别是,tf.contrib.rnn 是包含所有 RNN 单元的 TensorFlow 模块。您可以找到相关文档here

如果你想使用 LSTM 单元,你需要使用tf.contrib.rnn.LSTMCell

【讨论】:

    猜你喜欢
    • 2017-09-05
    • 1970-01-01
    • 1970-01-01
    • 2017-09-29
    • 2018-02-18
    • 1970-01-01
    • 2017-07-16
    • 2016-05-23
    • 2018-08-11
    相关资源
    最近更新 更多