tensorflow
Beryl_Jia
小马过河
展开
-
TypeError: Fetch argument None has invalid type <class 'NoneType'>解决方案
Tensorflow报错: TypeError: Fetch argument None has invalid type 报错完整内容: File "D:/Workspace/SpyderWorkspace/Models/RBM_mnist.py", line 211, in main sess.run(rbm.train_ops(k, step, i),feed原创 2017-05-31 10:11:52 · 31755 阅读 · 0 评论 -
tensorflow:tf.stack的用法
堆叠list类型的数据: import tensorflow as tf list_ = [[1, 2, 3], [4, 5, 6]] print(type(list_)) a = tf.stack(list_, 0) print(a.get_shape().as_list())输出结果: [2, 3]原创 2017-07-12 09:26:51 · 6077 阅读 · 0 评论 -
tensorflow:用dynamic_rnn处理不定长序列,对序列做padding处理
1. 数据处理(padding zero) 首先,我有一个list类型的数据集,按最长将序列的长度存储,不足长度的后面padding zero。将数据集存为ndarray类型的矩阵: import numpy as np dataset = [[[1], [2], [3], [4]], # list类型的数据集,有4个序列, feature_dim=1转载 2017-07-31 10:16:11 · 15402 阅读 · 1 评论 -
tensorflow报错:Shape must be rank 2 but is rank 3 for 'MatMul' (op: 'MatMul')
tensorflow矩阵相乘,秩不同报错 在tensorflow中写了这样一句: y_out = tf.matmul(outputs, W) 其中,outputs的shape为[16,336,400],W的shape为[400,1] 出现以下报错: Shape must be rank 2 but is rank 3 for 'MatMul' (op: 'MatMul') with原创 2017-07-03 09:58:01 · 18651 阅读 · 1 评论