Commit ccf2b7da authored by sjjsmuel's avatar sjjsmuel

change to keras default accuracy

parent f197c7ca
......@@ -5,7 +5,7 @@ from tensorflow.math import multiply, reduce_min, reduce_max, divide, add, l2_no
from tensorflow.linalg import matmul
import tensorflow as tf
from tensorflow.keras.losses import categorical_crossentropy
from tensorflow.keras.metrics import Accuracy, Mean
from tensorflow.keras.metrics import CategoricalAccuracy, Mean
Based on default example from Keras Docs.
......@@ -19,7 +19,7 @@ def custom_loss(y, y_pred, cam_loss):
return sub_loss(y, y_pred)
metric_tracker = Accuracy()
metric_tracker = CategoricalAccuracy()
loss_tracker = Mean(name='loss')
class CAMModel(Model):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment