neupyを使ってニューラルネットワークを構築したいと思います。 は、したがって、私は、次のアーキテクチャをconsturcted:NeuPy:形状の問題を入力してください
x_train.shape = (32589,10)
y_train.shape = (32589,1)
を私が使用してこのネットワークを訓練しようとすると::
network = layers.join(
layers.Input(10),
layers.Linear(500),
layers.Relu(),
layers.Linear(300),
layers.Relu(),
layers.Linear(10),
layers.Softmax(),
)
私のデータはfollwoingとして形作られている
model.train(x_train, y_trian)
私はfollwoingエラーを取得します:
ValueError: Input dimension mis-match. (input[0].shape[1] = 10, input[1].shape[1] = 1)
Apply node that caused the error: Elemwise{sub,no_inplace}(SoftmaxWithBias.0, algo:network/var:network-output)
Toposort index: 26
Inputs types: [TensorType(float64, matrix), TensorType(float64, matrix)]
Inputs shapes: [(32589, 10), (32589, 1)]
Inputs strides: [(80, 8), (8, 8)]
Inputs values: ['not shown', 'not shown']
Outputs clients: [[Elemwise{Composite{((i0 * i1)/i2)}}(TensorConstant{(1, 1) of 2.0}, Elemwise{sub,no_inplace}.0, Elemwise{mul,no_inplace}.0), Elemwise{Sqr}[(0, 0)](Elemwise{sub,no_inplace}.0)]]
この種のデータをマップするにはネットワークをどのように編集する必要がありますか?
ありがとうございました!