B
B
BitNeBolt2019-03-08 10:33:58
Neural networks
BitNeBolt, 2019-03-08 10:33:58

Why is prediction not happening?

I trained the neural network in one file, saved the training result, and then I try to load this result in another file and make a prediction there (using keras). The network was trained on this type of data (in a .csv file):

  • 0, 0, 0, 0
    0, 0, 1, 1
    0, 1, 0, 0
    etc

The first three values ​​are input and the last is the expected result.
Then in the file in which the prediction I do the following:
x = numpy.array([1, 0, 1])

print(model.predict(x))

But an error occurs:
"Error when checking input: expected dense_1_input to have shape (3,) but got array with shape (1,)"
What is the reason for this? With the wrong type of data that the network accepts, or was it trained incorrectly?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question