can I use conv2d with input dimension not fixed?

Viewed 104

i am new in tensorflow i have a question : Can i put in my conv2d an input with shape not fixed ? inputs.shape =(?, 1568) when i train my neural network i get this message : raise ValueError(f'Input {input_index} of layer "{layer_name}" ' ValueError: Input 0 of layer "conv2d" is incompatible with the layer: expected min_ndim=4, found ndim=2. Full shape received: (Dimension(None), Dimension(1568)) my con2d layer is like this : x = Conv2D(32, (3,3), padding="same",input_shape=input_shape[1:])(inputs)

1 Answers

I resolved that by using tf.expand_dims

Related