imageNet[img_Image]:=With[{imgWeights=ImageData[ImageResize[ColorConvert[img,"RGB"],NetExtract[net,{"Input","ImageSize"}],Resampling{"OMOMS",3}],InterleavingFalse]},NetChain["image"ConstantArrayLayer["Array"imgWeights],"network"net,"Output"NetExtract[net,"Output"]]]