Esempio n. 1
0
 public static KerasSymbol TopKCategoricalAccuracy(KerasSymbol y_true, KerasSymbol y_pred)
 {
     return(K.Mean(K.InTopK(y_pred, K.Argmax(y_true, axis: -1), 5), axis: -1));
 }
Esempio n. 2
0
 public static KerasSymbol MultiHotSparseCategoricalAccuracy(KerasSymbol y_true, KerasSymbol y_pred)
 {
     return(K.Cast(K.Equal(K.Max(y_true, axis: -1), K.Cast(K.Argmax(y_pred, axis: -1), K.FloatX())), K.FloatX()));
 }