简体   繁体   English

TFLearn“无法提供形状的值”。

[英]TFLearn “cannot feed value of shape.”

I started using a very basic Deep Belief Network in Node.js but it wasn't fast enough. 我开始在Node.js中使用一个非常基本的“深层信仰网络”,但是速度不够快。 Essentially it was using a X and Y where each is an array of arrays; 本质上,它使用的是XY ,其中每个都是数组的数组; X is the data to train and Y is the result. X是要训练的数据, Y是结果。

So I would feed it something like var x=[[1,2,3], [1,3,2]] etc. etc. and y=[[1,0], [1,0]] . 因此,我可以使用var x=[[1,2,3], [1,3,2]] 等等等y=[[1,0], [1,0]] Then I would give some data such as [2,3,1] and it would predict the y . 然后,我将提供诸如[2,3,1]数据,它将预测y

I'm lost on how to do this in tfslearn. 我不知道如何在tfslearn中执行此操作。 I can learn on my own but I've hit a point where I'm not sure what to even Google. 我可以自己学习,但遇到了甚至连Google都不确定的问题。

I can get the examples working if it's just a single array. 如果只是单个数组,我可以使示例工作。

Every time I try using an array of arrays I get: 每当我尝试使用数组数组时,都会得到:

cannot feed value of shape 无法提供形状的价值

I was setting the input shape incorrectly for my data set. 我为我的数据集设置了错误的输入形状。 This helped a lot: http://tflearn.org/tutorials/quickstart.html 这很有帮助: http : //tflearn.org/tutorials/quickstart.html

# Data loading and preprocessing
# Building deep neural network
net = tflearn.input_data(shape=[None, 4])
net = tflearn.fully_connected(net, 32)
net = tflearn.fully_connected(net, 32)
net = tflearn.fully_connected(net, 1, activation='softmax')
net = tflearn.regression(net)

# Training
model = tflearn.DNN(net)
model.fit(X, Y, n_epoch=10, batch_size=16, show_metric=True)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Tensorflor / TFLearn无法输入形状值 - Tensorflor/TFLearn Cannot feed value of shape Tflearn model.predict无法输入形状值(1、1、17) - Tflearn model.predict Cannot feed value of shape (1, 1, 17) 简单的tensorflow + tflearn神经网络出现“无法提供形状值”错误 - “Cannot feed value of shape” error with simple tensorflow + tflearn neural network python tflearn-ValueError:无法为张量'TargetsData / Y:0'输入形状为((?,2)'的形状(10,250,250,3)的值 - python tflearn - ValueError: Cannot feed value of shape (10, 250, 250, 3) for Tensor 'TargetsData/Y:0', which has shape '(?, 2)' Tensorflow / TFLearn-ValueError:无法为形状为((?,1)'的Tensor'target / Y:0'输入形状(64,)的值 - Tensorflow/TFLearn - ValueError: Cannot feed value of shape (64,) for Tensor 'target/Y:0', which has shape '(?, 1)' TensorFlow / TFLearn:ValueError:无法为Tensor u'target / Y:0'提供形状值(64,),其形状为'(?,10)' - TensorFlow/TFLearn: ValueError: Cannot feed value of shape (64,) for Tensor u'target/Y:0', which has shape '(?, 10)' Python Tflearn-ValueError:无法为张量u'InputData / X:0'输入形状为((?,2)'的形状(16,1)的值 - Python Tflearn - ValueError: Cannot feed value of shape (16, 1) for Tensor u'InputData/X:0', which has shape '(?, 2)' 尝试创建简单的加法模型时,TFLearn无法提供形状的值(ValueError) - TFLearn cannot feed value of shape (ValueError) when trying to create a simple addition model tflearn 3d张量-ValueError:无法输入形状值(50,15,15) - tflearn 3d tensor - ValueError: Cannot feed value of shape (50, 15, 15) TFLearn无法正确输入Y值 - TFLearn cannot feed Y value properly
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM