Issue
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)
Solution
I resolved that by using tf.expand_dims
Answered By - rif3aa dev
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.