tensorflow
AI_盲
努力爬。。。
展开
-
tensorflow scope命名方法(variable_scope()与name_scope()解析)
学习资料:不同 scope 对比代码reuse variable RNN 代码sharing variable tensorflow 官网介绍scope 能让你命名变量的时候轻松很多. 同时也会在 reusing variable 代码中常常见到. 所以今天我们会来讨论下 tensorflow 当中的两种定义 scope 的方式. 最后并附加一个 RNN 运用 reuse vari转载 2017-04-26 16:49:58 · 3936 阅读 · 0 评论 -
ValueError: Variable RNN/MultiRNNCell/Cell0/BasicLSTMCell/Linear/Matrix does not exist, disallowed.
ValueError: Variable RNN/MultiRNNCell/Cell0/BasicLSTMCell/Linear/Matrix does not exist, disallowed. Did you mean to set reuse=None in VarScope? 问题原因:Jupyter中运行多次cell时,默认在已存在的计算图上进行相同的操作解决方法如下:原创 2017-05-08 17:26:36 · 4937 阅读 · 2 评论 -
tf.tile() 用法介绍
tile() 平铺之意,用于在同一维度上的复制tile( input, #输入 multiples, #同一维度上复制的次数 name=None)示例如下:with tf.Graph().as_default(): a = tf.constant([1,2],name='a') b = tf.tile(a,[3]) sess原创 2017-06-05 15:30:57 · 72671 阅读 · 2 评论 -
RNN用于二值分类
import numpy as npimport randomwith np.load('rnn_data/file_name.npz') as data: feature = data['feature'] label = data['label'] rea_lenth = data['true_lenth'] #实际长度#迭代器class SimpleDat原创 2017-07-04 11:22:34 · 6321 阅读 · 11 评论 -
RNN(LSTM)用于分类
import tensorflow as tfimport sysimport random from sklearn.cross_validation import train_test_splitfrom sklearn.cross_validation import StratifiedKFold #StratifiedKFoldimport matplotlib.pyplot原创 2017-04-27 16:53:36 · 20078 阅读 · 8 评论 -
远程访问Tensorboard
训练完模型后使用如下命令进行端口号映射:tensorboard --port 10004 --logdir='/path/to/log-directory' (/path/to/log-directory为自己设定的日志存放路径,10004为自己设置的服务器空闲端口号)接下来在浏览器上的访问地址:http://121.*.*.*:20064/ (服务器地址+映射后的端口号(20原创 2017-11-21 11:36:05 · 1400 阅读 · 0 评论