I’m officially stranded with this exercise and no clue what’s going on. I even referenced other people’s code from GitHub and turns out they are using exactly the same code but it seems to have worked for them but not for me. Any help/insight in how to solve this issue is greatly appreciated.
This is the function that I’m asked to complete (but doesn’t provide the correct output):
def unet_model(input_size=(96, 128, 3), n_filters=32, n_classes=23):
“”"
Unet model
Arguments:
input_size -- Input shape
n_filters -- Number of filters for the convolutional layers
n_classes -- Number of output classes
Returns:
model -- tf.keras.Model
"""
This is the error message:
Test failed
Expected value
[‘Conv2DTranspose’, (None, 12, 16, 256), 1179904]
does not match the input value:
[‘Conv2DTranspose’, (None, 12, 16, 32), 147488]
AssertionError Traceback (most recent call last)
Input In [13], in <cell line: 7>()
4 num_channels = 3
6 unet = unet_model((img_height, img_width, num_channels))
----> 7 comparator(summary(unet), outputs.unet_model_output)
File /tf/W3A2/test_utils.py:21, in comparator(learner, instructor)
16 if tuple(a) != tuple(b):
17 print(colored(“Test failed”, attrs=[‘bold’]),
18 “\n Expected value \n\n”, colored(f"{b}“, “green”),
19 “\n\n does not match the input value: \n\n”,
20 colored(f”{a}", “red”))
—> 21 raise AssertionError(“Error in test”)
22 print(colored(“All tests passed!”, “green”))
AssertionError: Error in test