AttributeError: 'ReLU' object has no attribute 'threshold'

Traceback (most recent call last):
File “reload-AlexNet.py”, line 103, in
outputs = alexnet(frame)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”, line 491, in call
result = self.forward(*input, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/torchvision/models/alexnet.py”, line 44, in forward
x = self.features(x)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”, line 491, in call
result = self.forward(*input, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/container.py”, line 97, in forward
input = module(input)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”, line 491, in call
result = self.forward(*input, **kwargs)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/activation.py”, line 50, in forward
return F.threshold(input, self.threshold, self.value, self.inplace)
File “/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py”, line 537, in getattr
type(self).name, name))
AttributeError: ‘ReLU’ object has no attribute ‘threshold’

Does anyone know how to solve this issue ?

By the way, i can run the code on my imac and the version of pytorch is 1.1.0

On my tx2,the version is
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type “help”, “copyright”, “credits” or “license” for more information.

import torch
torch.version
'1.1.0a0+b457266

I solved this.
It seems that I must use the recommended way like

the_model = TheModelClass(*args, **kwargs)
the_model.load_state_dict(torch.load(PATH))
https://pytorch.org/docs/master/notes/serialization.html

to reload my net on the Jetson Tx2.