input value doesn't match my neural network model

hello, I train a regression model, from image to 3 number as output, and I want to deploy it on M7.
My model was trained with caffe transform params that pixel value of 0-255 trans to 0-1, which the pixel value of Image class on the board does not match my input.
But I found nothing with image pixel rescaled method. Is there such method existed?
Another question is, I try to bypass this problem by adding a “trans” convolution layer after Data layer with fixed params, weight=1/255 and bias=0. When I deploy this model, the program crashed when running

nn.forward(img)

and no error message.
The original model without “trans” conv layer can work but just outputs nonsense numbers.

Hi, there’s no function to scale image values to floats, can you retrain without transform/scaling the values ?

I tried to retrain the non-normalized model, but the accuracy can’t achieve my demand.
The compromising way that i’ve tried is to add a 1x1 conv layer with fixed params as scaling. But once I run the model, the board disconnects with IDE. Can you provide any possible reason for me to debug?

This layer is probably not supported.

I build a model with single such 1x1 conv layer. The image input is 28x28 uint8 and the expected output should be 28x28 0-1 float, but I just got one float number as output. So the board is truly unsupported with 1x1 kernel conv layer?

Yes it’s probably not supported by the conversion scripts or NN libraries if it crashes the camera.