Torch.load() and torch.save() not working

Getting this error on this call back

Traceback (most recent call last):
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/flask/app.py”, line 2309, in call
return self.wsgi_app(environ, start_response)
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/flask/app.py”, line 2295, in wsgi_app
response = self.handle_exception(e)
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/flask/app.py”, line 1741, in handle_exception
reraise(exc_type, exc_value, tb)
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/flask/app.py”, line 2292, in wsgi_app
response = self.full_dispatch_request()
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/flask/app.py”, line 1815, in full_dispatch_request
rv = self.handle_user_exception(e)
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/flask/app.py”, line 1718, in handle_user_exception
reraise(exc_type, exc_value, tb)
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/flask/app.py”, line 1813, in full_dispatch_request
rv = self.dispatch_request()
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/flask/app.py”, line 1799, in dispatch_request
return self.view_functionsrule.endpoint
File “/Users/Documents/Internship Main/test/flaskintro.py”, line 138, in upload
torch.save(model, “/Users/Documents/Internship Main/test/model/my_model.t7”)
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/torch/serialization.py”, line 161, in save
return _with_file_like(f, “wb”, lambda f: _save(obj, f, pickle_module, pickle_protocol))
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/torch/serialization.py”, line 118, in _with_file_like
return body(f)
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/torch/serialization.py”, line 161, in
return _with_file_like(f, “wb”, lambda f: _save(obj, f, pickle_module, pickle_protocol))
File “/Users/Documents/Internship Main/test/venv/lib/python2.7/site-packages/torch/serialization.py”, line 232, in _save
pickler.dump(obj)
PicklingError: Can’t pickle <type ‘instancemethod’>: attribute lookup builtin.instancemethod failed

And don’t know why won’t correctly pickle or why it thinks that the model is type instance method

Could you post a code snippet of what you’re trying to save?