深度学习中tensorflow框架的学习
1.如何查看tensorflow版本与存储位置
import tensorflow as tf print(tf.__version__) print(tf.__path_)
注:__看着是一个下划线,实际上是两个下划线
本人用的是0.12.0-rc0版本
2.报错module 'tensorflow.python.ops.nn' has no attribute 'rnn_cell'
#原因是1.0版本改了不少地方 #原来是这样的: from tensorflow.python.ops import rnn, rnn_cell lstm_cell = rnn_cell.BasicLSTMCell(rnn_size,state_is_tuple=True) outputs, states = rnn.rnn(lstm_cell, x, dtype=tf.float32) #修改成这样的: from tensorflow.contrib import rnn lstm_cell = rnn.BasicLSTMCell(rnn_size) outputs, states = rnn.static_rnn(lstm_cell, x, dtype=tf.float32)
小结:注意版本区别
关于tensorflow报错及纠错方面可以参照链接http://www.cnblogs.com/huntto...
相关推荐
xjtukuixing 2020-10-27
Icevivian 2020-08-25
comwayLi 2020-08-16
Micusd 2020-11-19
lybbb 2020-10-15
lybbb 2020-09-29
ghjk0 2020-09-24
yamaxifeng 2020-09-09
GDGYZL 2020-08-28
lybbb 2020-08-28
carbon0 2020-08-16
源式羽语 2020-08-09
sherry颖 2020-08-01
songbinxu 2020-07-19
sherry颖 2020-07-18
Niteowl 2020-07-15
Kindle君 2020-07-15
源式羽语 2020-07-04
源式羽语 2020-06-28