I want to know the type of the return value of "bitmapToFloat32Tensor"

Question about “bitmapToFloat32Tensor” in “pytorch_mobile”.

The input is a bitmap and the output is a tensor.
I would like to know more about this tensor sequence, which I would like to have machine learning to reason about.

Idealized array

                   [ [ [ [blue, blue, blue........blue],
                         [blue, blue, blue........blue],
                                           ~ 
                         [blue, blue, blue........blue],
                       ],
                       [ [green, green, green.......green],
                                            ...

.shape = [1, 3, height, width]

Based on this code it seems the returned tensor would have the shape [1, 3, height, width] and thus the channels are in dim1.

1 Like

Thank you!!
You’ve solved the problem.