Course 4 week 2 MobileNet exercise 3 'Accuracy' bug

Hi there,
I’m facing problem in MobileNet Transfer learning assignment (Exercise 3).
Precisely I’m facing in trouble to specify accuracy metric. Below screenshot contains what I tried. But when I go for check then it prompts with ‘Accuracy’ is not subscriptable

2 Likes

Hello @kushaldev

I had the same problem. There is no need to call tf.metrics.Accuracy.
What you need is to specify a metric as 'accuracy' one, for the hint check how it was specified in your code above when .compile was firstly called

8 Likes

Hii @Viktoriia
lol I got the point. I did same previously but thought that it is so simple so it can’t be the correct way. Sometimes simple is better :blush:

1 Like

Hi @Viktoriia Thanks for your help, I guess we all did the same mistake :slight_smile:

1 Like

I am doing metrics=“accuracy”, but still receiving errors with the test asserting that the wrong metric is being used - any advice?

put “accuracy” inside a list - think that should work

5 Likes

Didn’t work for me. :frowning: Got the following when I put it in a list.
We expected variable metrics to be of type <class ‘str’>
And I got this when I write a plain string:
We expected a value of ‘accuracy’ and you have ‘a’

metrics tiene que ser del tipo lista var = [‘value’]

did u fix it, i am facing the same trouble

@awesome @Viktoriia thanks a lot for the hint