title: cannot load locally pretrained model that I deployed via sagemaker notebook
body: <p>Trying to deploy locally pretrained model via sagemaker to make a endpoint and use it
  I have been learning AI/ML field lately, and I am such a noob.
  Need a help.</p>
  <h1>I deployed a model</h1>
  <pre><code>from sagemaker.pytorch import PyTorchModel
  
  pytorch_model = PyTorchModel(model_data='model.tar.gz',
                               role=role,
                               entry_point='inference.py',
                               framework_version=&quot;1.11.0&quot;,
                               py_version=&quot;py38&quot;)
  
  predictor = 
  pytorch_model.deploy(instance_type='ml.g4dn.xlarge', 
  initial_instance_count=1)
  </code></pre>
  <h1>and predict data</h1>
  <pre><code>from PIL import Image 
  data = Image.open('./samples/inputs/1.jpg')
  result = predictor.predict(data)
  img = Image.open(result)
  img.show()
  </code></pre>
  <p>as a result I got an error that I cannot load my model</p>
  <p>you can see the error log as well in <a href="https://github.com/pytorch/serve/issues/1813" rel="nofollow noreferrer">here</a></p>