A
A
Andrei1penguin12021-04-26 00:02:30
Python
Andrei1penguin1, 2021-04-26 00:02:30

Why doesn't Keras accept the mse loss function?

Good day, there is a task of detecting an object on the image, respectively, the model ends with a layer Compiled as follows: But when you try to train it, the following error pops up: ValueError: A target array with shape (25, 200, 200, 3) was passed for an output of shape (None, 4) while using as loss `mean_squared_error`. This loss expects targets to have the same shape as the output. Please tell me how can I fix this?
Dense(4, activation="sigmoid")
model.compile(optimizer="rmsprop", loss="mse")

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