python - Inserting data into regression network in keras -
i struggling understand how should train regression network using keras. not sure how should pass input data network.
both input data , output data stored list of numpy arrays.
each input numpy array matrix has (400 rows, x columns) each output numpy array matrix has (x number of rows, 13 columns)
so input dimension 400 , output 13. how pass each of these sets within list training?
# multilayer perceptron model = sequential() # feedforward model.add(dense(3, input_dim=400)) model.add(activation('tanh')) model.add(dense(1)) model.compile('sgd', 'mse')
just parsing data gives me error message :
traceback (most recent call last): file "tensorflow_datapreprocess_mfcc_extraction_rnn.py", line 167, in <module> model.fit(train_set_data,train_set_output,verbose=1) file "/usr/local/lib/python2.7/dist-packages/keras/models.py", line 620, in fit sample_weight=sample_weight) file "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 1034, in fit batch_size=batch_size) file "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 961, in _standardize_user_data exception_prefix='model input') file "/usr/local/lib/python2.7/dist-packages/keras/engine/training.py", line 51, in standardize_input_data '...') exception: error when checking model input: list of numpy arrays passing model not size model expected. expected see 1 arrays instead got following list of 270 arrays: [array([[ -1.52587891e-04, 3.05175781e-05, -1.52587891e-04, -5.18798828e-04, 3.05175781e-05, -3.96728516e-04, 1.52587891e-04, 3.35693359e-04, -9.15527344e-05, 3.3...
Comments
Post a Comment