Week 3 : Image Segmentation with U-Net

i get all tests passed in the implementation of conv_block() and upsampling_block()
but in the test of the unet_model() i get this error i don’t know how to figure it out

Layer conv2d_18 expects 1 inputs, but it received 2 input tensors. Inputs received: [<tf.Tensor ‘conv2d_17/Relu:0’ shape=(None, 96, 128, 64) dtype=float32>, <tf.Tensor ‘conv2d_17/Relu:0’ shape=(None, 96, 128, 64) dtype=float32>]

Hi samehetman,

Have a look here: Image Segmentation - #2 by reinoudbosch

Good luck!

hi thanks for your answer
i modified it so that i takes to outputs from conv_block
but i encountered another problem

Hi samehetman,

Based on the code you posted in your previous post, note that cblock1 starts with n_filters. After this, the number of filters doubles at each step. This means you have to make some adjustments to your code. This may not resolve everything, but let’s see. Good luck with this part!

facing same error … where you able to crack it ?

I ran into the same error.
cblock2 = conv_block(cblock1, 2*2*n_filters)
The reason your are getting error on above line is because you are passing the entire output of previous conv_block1() which has both layer and skip_connection (see what your conv_block() is returning). You just need the layer as input to the next block. So filter for the right tensor (not both tensors) by using slicing [0] or [1] depending on the position.