Hi Naeimeh.A, I followed carefully the instructions and still get the following:ValueError Traceback (most recent call last)
in
4 num_channels = 3
5
----> 6 unet = unet_model((img_height, img_width, num_channels))
7 comparator(summary(unet), outputs.unet_model_output)
in unet_model(input_size, n_filters, n_classes)
19 # Chain the first element of the output of each block to be the input of the next conv_block.
20 # Double the number of filters at each new step
—> 21 cblock2 = conv_block(cblock1, n_filters2)
22 cblock3 = conv_block(cblock2, n_filters4)
23 cblock4 = conv_block(cblock3, n_filters*8, dropout=0.3) # Include a dropout_prob of 0.3 for this layer
in conv_block(inputs, n_filters, dropout_prob, max_pooling)
19 activation=‘relu’,
20 padding=‘same’,
—> 21 kernel_initializer=‘he_normal’)(inputs)
22 conv = Conv2D(n_filters, # Number of filters
23 3, # Kernel size
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py in call(self, *args, **kwargs)
924 if _in_functional_construction_mode(self, inputs, args, kwargs, input_list):
925 return self._functional_construction_call(inputs, args, kwargs,
→ 926 input_list)
927
928 # Maintains info about the Layer.call
stack.
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/base_layer.py in _functional_construction_call(self, inputs, args, kwargs, input_list)
1090 # TODO(reedwm): We should assert input compatibility after the inputs
1091 # are casted, not before.
→ 1092 input_spec.assert_input_compatibility(self.input_spec, inputs, self.name)
1093 graph = backend.get_graph()
1094 # Use self._name_scope()
to avoid auto-incrementing the name.
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/engine/input_spec.py in assert_input_compatibility(input_spec, inputs, layer_name)
156 str(len(input_spec)) + ’ inputs, ’
157 'but it received ’ + str(len(inputs)) +
→ 158 ’ input tensors. Inputs received: ’ + str(inputs))
159 for input_index, (x, spec) in enumerate(zip(inputs, input_spec)):
160 if spec is None:
ValueError: Layer conv2d_43 expects 1 inputs, but it received 2 input tensors. Inputs received: [<tf.Tensor ‘max_pooling2d_13/MaxPool:0’ shape=(None, 48, 64, 32) dtype=float32>, <tf.Tensor ‘conv2d_42/Relu:0’ shape=(None, 96, 128, 32) dtype=float32>]
Maybe you can direct me to my fault? thanks