To explain it in more detail:
When we define transformations in pytorch which is basically a pre-process step.
For example, lets say i have a dataset of images,
colored images 512*768but i trained the model on b&w, center cropped, resized images, so this is the transformation i chose.
now at real time predictions, when you will write the client side code,
you may need to define this transformation there too,
since your model’s input layer will expect a specific shape wrt channel, size etc. so in tensorflow it is possible to define whatever transformation we did, as a part of the model graph
so at real time we don’t have to make any manipulations
just send the raw data.
while in pytorch i couldn’t find a way to offload this dependency.