myungsub / CAIN

Source code for AAAI 2020 paper "Channel Attention Is All You Need for Video Frame Interpolation"
MIT License
326 stars 43 forks source link

Bugfix/random-seed-for-pytorch>=1.6 #25

Open NamJiii opened 1 year ago

NamJiii commented 1 year ago

Hello,

I wanted to report an issue that I encountered while training on the Vimeo90k dataset using PyTorch 1.6 or higher, and I believe it to be a bug.

The problem arises from the fact that the random seed is no longer fixed with the 'random.seed(seed)' code in PyTorch versions 1.6 and later. As a result, the training process does not work as expected.

To address this issue, I propose a simple fix by adding __'torch.manual_seed(seed)'__ to the code. By including this line, the random seed will be properly set, leading to consistent and reliable training results.

I have tested this solution with PyTorch 2.0 and CUDA 12.0, and I can confirm that the code works flawlessly after implementing this fix.

Best regards, Jihoon Nam