Actually I want to deploy my model in next step so for this reason i tagged torchx. Anyways, as of this in hand problem it has nothing to do with torchx. For better understanding of my problem i removed that specific part of code. Hope I clarified.