• create a vector for input to custom model

I have a custom model which requires some manipulation of the image and creation of a specific tensor that feeds into the inference blob. How do I accomplish this in the pipeline?

    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