Make accuracy metrics work with masked outputs (#5866)
Make accuracy metrics work with masked outputs (#5866)

* Make accuracy metrics work with masked outputs

Several accuracy metrics end in a call to `K.equal()`, which gives a tensor with dtype `bool`.  The multiplication with a float mask then crashes.  This fixes that crash.

* Move cast to metrics

keras-team/keras,keras-team/keras