File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change 22from __future__ import division
33from __future__ import print_function
44
5+ from . import config
56from .backend import tf
67
78
@@ -15,6 +16,10 @@ def mean_squared_error(y_true, y_pred):
1516 return tf .reduce_mean (tf .math .square (y_true - y_pred ))
1617
1718
19+ def zero (* _ ):
20+ return tf .constant (0 , dtype = config .real (tf ))
21+
22+
1823mean_absolute_error = tf .keras .losses .MeanAbsoluteError ()
1924mean_absolute_percentage_error = tf .keras .losses .MeanAbsolutePercentageError ()
2025softmax_cross_entropy = tf .losses .softmax_cross_entropy
@@ -35,6 +40,7 @@ def get(identifier):
3540 "MAPE" : mean_absolute_percentage_error ,
3641 "mape" : mean_absolute_percentage_error ,
3742 "softmax cross entropy" : softmax_cross_entropy ,
43+ "zero" : zero ,
3844 }
3945
4046 if isinstance (identifier , str ):
You can’t perform that action at this time.
0 commit comments