Can't display patches of a grayscale image

26 Views Asked by At

I am trying to do multiclass classification of a grayscale image dataset using ViT. But while trying to display the patches it gives error. I am pasting the code alongwith the error encountered. The images are of size 224x224.

patch_img = tf.reshape(patch,(patch_size,patch_size,1))

InvalidArgumentError: {{function_node __wrapped__Reshape_device_/job:localhost/replica:0/task:0/device:GPU:0}} Input to reshape is a tensor with 10976 values, but the requested shape has 49 [Op:Reshape]your text`
0

There are 0 best solutions below