yingkaisha/keras-unet-collection

Exemple 3 in the user guide

St-Savin opened this issue · 0 comments

The code for the third exemple in the user guide (attention-Unet for single target regression) does not work for me. When I train the model, I get this error : "

ValueError: Negative dimension size caused by subtracting 2 from 1 for '{{node attunet_model/attunet_down1_encode_stride_conv/Conv2D}} = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], explicit_paddings=[], padding="VALID", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true](attunet_model/attunet_down0_1_activation/Relu, attunet_model/attunet_down1_encode_stride_conv/Conv2D/ReadVariableOp)' with input shapes: [?,1,1,64], [2,2,64,128]

"
I created a training matrix of 3 variables a vector for the labels and then added 2 other dimensions so it can be processed by the unet.Maybe that is the problem.

train_labels = default_rng(42).random((386))
train_specs = default_rng(42).random((386,3))
train_specs = tf.expand_dims(train_specs, axis=1)
train_specs = tf.expand_dims(train_specs, axis=1)

thanks for your efforts.