Home > Software engineering >  How to use tf.image.extract_patches for tensors other than images
How to use tf.image.extract_patches for tensors other than images

Time:02-10

I have to divide a tensor in to patches. I can use tf.image.extract_patches to convert1x128x128x3 image to a 4x32x32x3. Here the first element shows the batch size and for the input image, batch size is 1. It will produce 4 output images of size each 32x32x3. Is there any tensorflow implementation which I can use to convert 1x128x128x5 to 4x32x32x5. Here I want to divide a tensor of 1x128x128x5 into 4 tensors of each 4x32x32x5 small patches.

CodePudding user response:

  •  Tags:  
  • Related