rotemtzaban / STIT

MIT License
1.2k stars 170 forks source link

fix bug of train & edit_video #17

Closed mazzzystar closed 2 years ago

mazzzystar commented 2 years ago

1.Fix bug of type dismatch for transform.Resize() in training part. The original code would results in TypeError: img should be PIL Image. Got <class 'torch.Tensor'>. I replace the Resize op with F.interpolate when the image was still a Tensor so do not need to convert type TWICE.

2.Fix bug of Normalize for transform.normalize in edit_video.py.

rotemtzaban commented 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?

mazzzystar commented 2 years ago

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.