Error for Assignment 3 Excercise 5

Hello

I am getting an error with Assignment 3 Excercise 5 with regards to the soft dice loss


AssertionError Traceback (most recent call last)
in ()
6 ### do not edit anything below
7 sess = K.get_session()
----> 8 soft_dice_loss_test(soft_dice_loss, epsilon, sess)

~/work/W3A1/public_tests.py in soft_dice_loss_test(target, epsilon, sess)
412 ]
413
→ 414 multiple_test_dice(test_cases, target, sess)
415
416 ##############################################

~/work/W3A1/test_utils.py in multiple_test_dice(test_cases, target, sess)
183 print(‘\033[92m’, success," Tests passed")
184 print(‘\033[91m’, len(test_cases) - success, " Tests failed")
→ 185 raise AssertionError(“Not all tests were passed for {}. Check your equations and avoid using global variables inside the function.”.format(target.name))

AssertionError: Not all tests were passed for soft_dice_loss. Check your equations and avoid using global variables inside the function.

Thanks for your help

Eric

Hi @Eric5,

Can you send me a message with your code to have a look at it? It looks like your code is missing something in here, and that is why your are getting this error.

Hi @Eric5,

I have checked your code, and you have made a mistake in there. Please go back to the provided formula for the dice_loss above the exercise, and correct the dice_denominator solution in your code.

Let me know if you succeed in doing so, or if you still need help.