jeffreyyihuang / two-stream-action-recognition

Using two stream architecture to implement a classic action recognition method on UCF101 dataset
MIT License
855 stars 252 forks source link

UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0: ordinal not in range(128) #47

Open fcxmcc opened 5 years ago

fcxmcc commented 5 years ago

i try to reload the spatial model but it's not useful,,,..... the report errors as follows:

torch.Size([3, 224, 224]) ==> Validation data :71877frames torch.Size([3, 224, 224]) ==> Build model and setup loss and optimizer ==> loading checkpoint 'record/spatial/spatial_video_preds.pickle' Traceback (most recent call last): File "/home/xm/python/action/two-stream-action-recognition-master/spatial_cnn.py", line 268, in main() File "/home/xm/python/action/two-stream-action-recognition-master/spatial_cnn.py", line 65, in main model.run() File "/home/xm/python/action/two-stream-action-recognition-master/spatial_cnn.py", line 109, in run self.resume_and_evaluate() File "/home/xm/python/action/two-stream-action-recognition-master/spatial_cnn.py", line 93, in resume_and_evaluate checkpoint = torch.load(self.resume) File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 367, in load return _load(f, map_location, pickle_module) File "/usr/local/lib/python3.6/dist-packages/torch/serialization.py", line 528, in _load magic_number = pickle_module.load(f)

loweite commented 5 years ago

add code "#coding:utf-8" at the top of spatial_cnn.py file

wcyy0123 commented 2 years ago

pickle_module.load(f) -> pickle.load(f,encoding='bytes')