![]() You should use Model API which is also called the functional API. Now you can use the second method you have trying to fit to the model model0.fit(,output, batch_size=16, epochs=100)Īs in the answer you've linked, you cant be using the Sequential API for the stated reason. ![]() ![]() Output = (1, activation=, use_bias=True)(dense1) Merged = (axis=1)()ĭense1 = (2, input_dim=2, activation=, use_bias=True)(merged) This is the most recommened way to use when there are multiple inputs to the model. Model0.fit(merged_array,output, batch_size=16, epochs=100) Let's assume the two arrays have a shape of (Number_data_points, ), now the arrays can be merged using numpy.stack method. You can concatenate both arrays into one before feeding to the network. To solve this problem you have two options. Expected to see 1 array(s), but instead got the following list of 2 arrays: ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. The second way: model0.fit(,output, batch_size=16, epochs=100) ValueError: Error when checking input: expected dense_input to have shape (2,) but got array with shape (336,) model0.fit(numpy.array(),output, batch_size=16, epochs=100) I tried two ways, both of them are giving errors. (2, input_dim=2, activation=, use_bias=True), The neural network has 1 hidden layer with 2 neurons. I have two input arrays (one for each input) and 1 output array. I am making a MLP model which takes two inputs and produces a single output.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |