U-Net Image Segmentation

I am facing a curious issue on Image segmentaion project,
I tried to debug the issue by following the post image-segment-issue,

But still i am getting error traceback as ValueError: Layer conv2d_44 expects 1 inputs, but it received 3 input tensors. Inputs received: [<tf.Tensor: shape=(), dtype=int32, numpy=96>, <tf.Tensor: shape=(), dtype=int32, numpy=128>, <tf.Tensor: shape=(), dtype=int32, numpy=3>]

for function implementation def unet_model()

I have implemented Contracting block as :–>
cblockn = conv_block(cblock_n-1[0], pref_filter * 2)

Up block β†’
ublockn = upsampling_block(ublock_n-1, cblock_corresponding[1], prev_filter /2 )

The above is different for first cblock and bottleneck layer.

Also the last Conv2d layer(conv10) , was defined without any kernal_initiliaztion and activation(with n_classes filter, kernel size of 1 and a β€˜same’ padding)

I am n ot posting the code since it violates the forum rules.I feel its a silly mistake which i may have made,but not able to find it :slight_smile:

Hi salman0149,

From what you describe, the issue may lie with the first ublock following the last cblock. What should ublock6 use for its input tensor?

1 Like

Hi Rein,

It was a silly mistake which i did , now git resolved , in the first conv block instead of passing inputs i have passed inputs_size :slight_smile: , Thanks