suraj.pt:

Gradients cannot exist for non-continuous values. You might want to use tanh() instead (see this thread for a similar issue Step Activation Function)


Thanks for your reply. The thing is that I need the vector to be binary, because i want to calculate the true / false positives in the function. Is there a work around that you are aware of ?