Closed mazzzystar closed 2 years ago
@mazzzystar Hi, I am not getting any errors with the original code, but it seems to me the errors you are describing are a result of a version issue. The source seems to be the pytorch/torchvision packages. What versions of them are you using?
I'm using
torch=1.7.0
torchvision=0.4.1
OK if it's because of version difference, there is no need for a PR, I'll close it.
1.Fix bug of type dismatch for
transform.Resize()
in training part. The original code would results inTypeError: img should be PIL Image. Got <class 'torch.Tensor'>
. I replace theResize
op withF.interpolate
when the image was still aTensor
so do not need to convert type TWICE.2.Fix bug of Normalize for
transform.normalize
inedit_video.py
.