我尝试从GitHub使用MLPClassifier:使用MLPClassifier Tensorflow
但其实我不知道怎样才能用我自己的数据使用它。我有尺寸为20000x100的特征矩阵X和尺寸为20000的5个类别的目标矢量y。
X和y保存在一个numpy数组中。我感到困惑的是:
x = tf.placeholder("float", [None, n_input]) #n_input is 100 here, right?
y = tf.placeholder("float", [None, n_classes])
total_batch = int(mnist.train.num_examples/batch_size) #What is that for my data?
batch_x, batch_y = mnist.train.next_batch(batch_size)#what are these?
谢谢,但我仍然有问题与我y。当我用n_classes = 5定义y = tf.placeholder(“float”,[None,n_classes])时,那么我的y的维度是?x5而不是?x1?另外我不确定total_batch?我认为这只是一个例子,对吧? – HansPeterLoft
我用y解决了这个问题,它被表示为一个矩阵。 – HansPeterLoft
我编辑了我的答案以清除 – ted