Transfer_learning_with_MobileNet_v1 exercise 3 fine tuning

In exercise 3 of fine tuning function, I’m getting an error in the accuracy metric assertion code:

TypeError Traceback (most recent call last)
3 assert type(optimizer) == tf.keras.optimizers.Adam, “This is not an Adam optimizer”
4 assert == base_learning_rate / 10, “Wrong learning rate”
----> 5 assert metrics[0] == ‘accuracy’, “Wrong metric”
7 print(’\033[92mAll tests passed!’)

TypeError: ‘Accuracy’ object is not subscriptable

I’m not understanding what this error is and how can I rectify it. Kindly help

Apparently you did not set the “metrics” value correctly.

I used tf.keras.metrics.Accuracy(name=“accuracy”, dtype = None), accuracy class for metrics. Is there any other function that I can use?

That’s not the method the instructions tell you to use.
“metrics” is a simple variable, not a TF layer.

Ok I understood my mistake. Thanks for your help! Appreciate it.