C4 Week 2 - ResNet50 Error - GRADED FUNCTION: ResNet50

Please verify if this block is working correctly, after a long time of troubleshooting I plugged in code from discussion question for this block, which was the same as my code. So I don’t believe my code is wrong: The error I get is:


RuntimeError Traceback (most recent call last)
in ()
----> 1 model.fit = ResNet50(input_shape = (64, 64, 3), classes = 6)

in ResNet50(input_shape, classes)
66 # Create model
—> 67 model = Model(inputs = X_input, outputs = X, name=‘ResNet50’)
69 return model

/opt/conda/lib/python3.6/site-packages/keras/legacy/interfaces.py in wrapper(*args, **kwargs)
85 warnings.warn('Update your ' + object_name + 86 ' call to the Keras 2 API: ’ + signature, stacklevel=2)
—> 87 return func(*args, **kwargs)
88 wrapper._original_function = func
89 return wrapper

/opt/conda/lib/python3.6/site-packages/keras/engine/topology.py in init(self, inputs, outputs, name)
1806 ’ times in the model. ’
1807 'All layer names should be unique. ’
→ 1808 'Layer names: ', all_names)
1810 # Layer parameters.

RuntimeError: ('The name “res2b_branch2a” is used 3 times in the model.

Hi stackaccount1,

Could it be that you are working on an old version of the assignment? The current version does not use layer names.

Here you can see how to refresh the lab workspace (scroll down to “Refresh you Lab Workspace”):

You may want to go to File → Open… and copy or download the version of the notebook you are working on first so as to not loose any code.

Hope this helps.

I was working on the latest version of the notebook, I do not think this is the issue

I refreshed the lab and still have this issue, please advise

Hi stackaccount1,

Does the assignment description match the one provided here in the attached snapshot? If so, you can see that no layer names are used.

Thank you, I do not see, I still have layer a, b,c etc. although I am on the latest version v2a. Maybe the last notebook did not update for me. I have followed the update instructions to no avail

That’s very unfortunate. It means you are not in the track with the newest course. I have posted an inquiry about how you could switch to the new track to people at the backend of deeplearning.ai who should know. Hopefully they will fill me in shortly so that I can inform you on how to do this.

In the meantime, you could try to contact the Coursera help desk: How to contact Coursera – Coursera Help Center.

Thank you, I have been slowly taking this deep learning specialization over the last several months at a very slow pace. So maybe that is why. I am nearly done with part 5 sequence models. So this is my last remaining piece to finish thank you for your help.

Hi stackaccount1,

I have received feedback on this issue. The only way to switch to the new version is to contact the coursera help center How to contact Coursera – Coursera Help Center and ask them to be un-enrolled from the old version and enrolled back to the updated version of the course. Good luck!

1 Like

Thank you I appreciate your help