I’m struggling to find online any information about iOS Pytorch inference with a model that expects a single channel/grayscale input tensor, as opposed to an RGB one. Does anyone have any resources or insight here?
I solved it this way: I stacked 3 copies of my input so that it has three channels and then I made the first operation as x = torch.mean(x,dim=1) in the forward method of the DL model…! The results from the app and from the computer are almost similar.
You need take care regarding the values of mean and std… accordingly…!!