I need to increase the dimension of a tensor from 3D to 4D because the tf.image.extract_patches
takes input images which is a 4-D Tensor with shape [batch, in_rows, in_cols, depth], where I think depth is for rgb images but what I'm using is greyscale images which produce 3D tensors and in turn throws error in the extract_patches function. So I want to increase the tensor dimension without any changes to its values.
The function works fine when I tried it with rgb image but when the same image is run in greyscale, it throws error.