dangweili / pedestrian-attribute-recognition-pytorch

A simple baseline for pedestrian attribute recognition in surveillance scenarios
332 stars 80 forks source link

problem in running demo.py #25

Closed GayatriPurandharT closed 4 years ago

GayatriPurandharT commented 4 years ago

Hello @dangweili , I converted py2 files to py3 and am using PyTorch 0.3.1 as specified. I get a Runtime error (screenshot is attached.)

Screenshot from 2019-09-27 00-14-22

Can you please guide me if I'm missing something. Thanks a lot.

GayatriPurandharT commented 4 years ago

That was due to an incorrect environment. Now it runs fine with python 3.6 and PyTorch 1.2.0

kHarshit commented 4 years ago

Update: Solved it #28

Hi @GayatriPurandharT, Can you please suggest the changes required to run this model in python3. So far, I've changed cpickle instances to pickle and added binary model to reading and writing operations rb.

GayatriPurandharT commented 4 years ago

Hey I first used python2-python3 converter, you can install using pip install 2to3 Then there are small changes to be done with using tensor.data instead of tensor.item(). With pytorch 1.2.0, it should work fine. Good luck.

kHarshit commented 4 years ago

Thank you @GayatriPurandharT