I need need help in on the Graded Function of conv_block. I have tried all different ways, I can not figure out the mistake. I gives me the error Expected value does not match with the input value. I someone can help me, I can send the portion of the code or my entire worked on assignment.
It is probably enough to show us the actual output of the failing test, because that will show the difference between what it expects and what it saw. Thatâs usually enough for us to give some advice about where to look and what to look for. Please just âcopy/pasteâ the full output that you get when you run the test that fails.
Ok, by looking at the âexpected valuesâ for the first and second test, notice that you passed the first test. In the second test, you fail on the first Conv2D layer. So I would bet that what this means is that you are hard-coding the number of filters as 32 instead of using the input parameter is n_filters. That bug gets past the first test, since the input value is actually 32. But then it fails the second test because n_filters is 1024 in that case.
Note that on the contracting path, each layer has two outputs, right? One of them feeds into the next layer and the second one feeds âacrossâ as the shortcut input to the corresponding upsampling layer. Then on the upsampling layer, each layer just outputs one tensor.
So that means anytime you are taking input from one of the conv_block outputs, you need to select either the first one or the second one, depending on what you are doing, right? There is no case in which you take both outputs at once as inputs.
As to item 2), that usually means you have not run one of the earlier cells that produces that variable unet. Either that or you ran it and it threw an error, so it didnât create anything. Try âKernel â Restart and Clear Outputâ followed by âCell â Run Allâ. Then scan through all the cells and make sure everything ran successfully.
I have used n_filters ( conv = Conv2D(n_filters,) in both layers, when I run, first layer test passes but second layer just gives the following error:
est failed
Expected value
/tf/W3A2/test_utils.py in comparator(learner, instructor)
17 â\n\n does not match the input value: \n\nâ,
18 colored(f"{a}", âredâ))
â> 19 raise AssertionError(âError in testâ)
20 print(colored(âAll tests passed!â, âgreenâ))
21
AssertionError: Error in test
Can you please help with a suggestion to resolve this?