Use accuracy as evaluation metric
> metrics = [tf.keras.metrics.Accuracy()]
when I use the code above , there’ll be AssertionError: Wrong metric.
And the score feedback 1st shows 100, but 2nd&3rd shows: Unexpected error occurred during variable check. We expected variable metrics
to be of type <class ‘str’>. Please check that this variable is initialized and is of the right type.
> metrics = tf.keras.metrics.Accuracy()
when I use the code above , it showsTypeError: ‘Accuracy’ object is not subscriptable
> metrics =[‘accuracy’]
when I use the code above , it shows all tests passed,
BUT the score feedback shows: Code Cell UNQ_C3: You have an incorrect value for ‘metrics’ variable. We expected a value of ‘accuracy’ and you have ‘<tensorflow.python.keras.metrics.Accuracy object at 0x7f40d56c48d0>’.
I’m confused.
Please help.
Thanks a lot!