AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'legacy_seq2s eq'
来源:互联网 发布:传奇盛世翅膀8升9数据 编辑:程序博客网 时间:2024/04/28 13:44
tensorflow 版本改动较大 如self.lossFct = tf.nn.legacy_seq2seq.sequence_loss
改成了self.lossFct = tf.nn.seq2seq.sequence_loss
import tensorflow as tfprint(tf.__version__)def _run_rnn(self, inputs): # embedded inputs are passed in here self.initial_state = tf.zeros([self._batch_size, self._hidden_size], tf.float32) cell = tf.nn.rnn_cell.GRUCell(self._hidden_size) cell = tf.nn.rnn_cell.DropoutWrapper(cell, output_keep_prob=self._dropout_placeholder) cell = tf.nn.rnn_cell.MultiRNNCell([cell] * self._num_layers, state_is_tuple=False) outputs, last_state = tf.nn.dynamic_rnn( cell = cell, inputs = inputs, sequence_length = self.sequence_length, initial_state = self.initial_state ) return outputs, last_state
阅读全文
0 0
- AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'legacy_seq2s eq'
- AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'seq2seq'
- module 'tensorflow.python.ops.nn' has no attribute 'seq2seq' ‘rnn_cell’
- AttributeError: module 'tensorflow.python.platform.flags' has no attribute 'mark_flag_as_required'
- AttributeError: module 'tensorflow' has no attribute 'pack'
- AttributeError: module 'tensorflow' has no attribute 'sub'
- AttributeError: module 'tensorflow' has no attribute 'select'
- AttributeError: module 'tensorflow' has no attribute 'mul'
- AttributeError: module 'tensorflow' has no attribute 'select'
- tensorflow bug: AttributeError: module 'tensorflow' has no attribute 'xxxx'
- tensorflow AttributeError: 'module' object has no attribute 'cpu_count'
- 【TensorFlow问题】AttributeError:'module' object has no attribute 'mul'
- Tensorflow报错:AttributeError: 'module' object has no attribute 'summary'
- 【Tensorflow】报错:AttributeError: 'module' object has no attribute 'scalar_summary'
- TensorFlow运行错误,AttributeError: module 'pandas' has no attribute 'computation'
- tensorflow AttributeError: 'module' object has no attribute 'cpu_count'
- tensorflow :AttributeError: 'module' object has no attribute 'computation'
- AttributeError: module 'tensorflow' has no attribute 'global_variables_initializer'解决
- ContentResolver和MediaStore介绍
- 极光推送
- Promise是Monad吗?
- 复习UITableViewCell
- codeforces 817D Imbalanced Array(单调栈)
- AttributeError: module 'tensorflow.python.ops.nn' has no attribute 'legacy_seq2s eq'
- JDK8新特性☞Function测试
- python 函数编程
- libevent入门
- Java基础学习笔记 第一部分 part 3
- 贪心算法的证明(贪心策略是安全的)
- libvlc外部api的简单整理
- 自定义完成一个日历(一)
- Ubuntu16 编译源码出错 unsupported reloc 43