Problem with passing custom loss in lab

It seems the instructions from how to pass a custom loss to the model are wrong. Instead of passing the function name as a string to model.compile you should just pass the name of the function:

model.compile(optimizer='SGD', loss=my_rmse)

instead of

model.compile(optimizer='SGD', loss='my_rmse')

as shown in the slides

Hi Christian! Welcome to the community! Can you post a screenshot of the instructions you found misleading? I’m not sure if the C1 W2 assignment explicitly mentions passing a string. Thanks!

Hi, this occured in the video about coding the Huber loss function at 1:50 or e.g. slide 26:

Oh I see! We’ll ask our video team to correct that. Thank you for pointing it out!