hi @ptrblck thanks for your reply… As I understand from the post you mentioned, Binary cross-entropy is not good for my problem. As one of the replies suggested I changed the loss function to categorical_crossentropy and the activation function to sigmoid, it does not work either.(it distinguishes the place of the nonzero element, But with the wrong magnitude(0.98 instead of 0.5)) Could you mind helping me with how to fix it?
The aim of the model is to find out that the magnitude of the non-zero element in each output (each row of y ) which in this case is 0.5 and should find the place of the non-zero element.  I used the MSE but in the best case, it find the magnitude as 0.1 instead of 0.5.