I wanted to link in a related thread where fellow learner @Leonard_Truscello made a valuable contribution by reporting that using the string name syntax option allows the model.compile() function to pick a metric based on the loss function, thus enforcing consistency.
[Transfer Learning with MobileNetV2 Error: 'Accuracy' object is not subscriptable - #8 by Leonard_Truscello]
For others reading this thread after hitting either the ‘Accuracy object is not subscriptable’ runtime error or failing the model[0] == ‘accuracy’ test assertion, take a look there.