How to change Tensor format to channels first in Tensorflow js?
I’m new to Computer Vision model structure, and I’m using Tensorflow for Node JS @tensorflow/tfjs-node
to make some models detect some objects. With Mobilenet and Resnet SSD, the models are using the Channels Last
format, so when I create a Tensor with tf.node.decodeImage
the format is by default Channels Last
, like shape: [1, 1200, 1200, 3]
for 3 channels, and the predictions data work great, able to recognize objects.