ValueError: operands could not be broadcast together with shapes (750, 4) (750,)

Broadcasting issue

You can resolve the error by explicitly reshaping Y_pred or pred.
But logically, number of columns in Y and Y_pred should be same to start with.

Can you share link to your notebook?

Not accessible. Make the link accessible to anyone., Y_train, epochs=2000, learning_rate=0.005, display_loss=True)

Here, instead of Y_train, you have to send one-hot-encoded vector i.e. Y_OH_train

1 Like