Editing a HopeNet code
I see the training and testing codes from the author of HopeNet, a state-of-the-art head pose estimation algorithm are designed to use with the old Python and PyTorch version. These codes can be modified to work with the newer version in three parts.
The first part is from a torchvision library. The hightlighted line is changed from transforms.Scale to transforms.Resize.
The second part is the xrange. The highlighted line can be changed to range instead.
The last part is the print Python commands (the below screenshot is the example). You have to make the quoted sentences inside parentheses.
0 notes