Looking at the documents the set layer seems to offer very stransformation. The transformation I need to make is as follows (from code to feed ONNX version of the NN):
def image_transform_onnx(path: str, size: int) -> np.ndarray:
image = Image.open(path)
image = image.resize(300,300) # will not neeed
image = np.array(image)
image = image.transpose(2,0,1).astype(np.float32)
image /= 255
image = image[None, ...]
return image