"Temporary Notes" Stupid bugs in programming career

In order to commemorate the silly bugs that appeared in the programming career, this note is hereby made for reference.

  1. The ToPILImage() function in torchvision
    torchvision.transforms.TOPILImage() is used to convert a tensorform of picture into a PILpicture format for subsequent processing, such as crop, resizeetc. But the input tensor shape of this function should be the same (Channels, Height, Width), don't put the channel to the end, otherwise there will be unexpected errors, and it is not easy to find. In pytorch, all input and output should be channel first (channel first).

Guess you like

Origin blog.csdn.net/LoseInVain/article/details/105795982