Course 4 week 3 lab

Good morning all.

My conv_block and unsampling_block are working perfectly after testing. However, unet_model keeps displaying the following error at the test: " 2 input tensor received, expected 1". The error note referenced my conv_block. I have been scratching my head since morning. I would appreciate any help with trouble-shooting and debugging please. Thank you.

1 Like

Please click my name and message your notebook as an attachment.

1 Like

The 1st conv_block invocation returns a tuple of 2 objects. You need only one of the returned items for subsequent invocations of conv_block.

2 Likes

Good evening Balaji,
Thank you for your response. Please be aware that my code input area is objectively restricted, between “Start Code Here” and “End Code Here”. I can not alter the output of the function as those were determined by the provided lab. In other words, the 2 tensor output are of next_layer = conv and skip_connection = conv were not defined by me.
Thank you once again sir.

1 Like

Sure, but you get to choose what you do with the return value of conv_block, right? That was Balaji’s point. Yes, it gives you two tensors back in the form of a “tuple”. So how do you extract the first element to use as input to the next conv block? And how do you extract the second one to pass to the corresponding upsampling block, when the time comes?

2 Likes

Hmmm… Ok, I see! Have to go back to figuring it out within my code block. Thanks a lot for the response. I get the tuple hint provided. Much appreciation :thanks:

1 Like