soapisnotfat / super-resolution

collection of super-resolution models & algorithms
Apache License 2.0
744 stars 188 forks source link

Why use torch.manual_seed(self.seed)? #3

Closed YongboLiang closed 6 years ago

YongboLiang commented 6 years ago

Hi, may you tell me that why use torch.manual_seed(self.seed) in build_model(self)? And What is its role? Thank you!

soapisnotfat commented 6 years ago

Hi Yongbo, Actually, manual_seed sets the random seed from pytorch random number generators, so it could keep the random initialization trackable and reproducible.

p.s. there is a bug in seed settings and it is ineffective now, I will update those when available

YongboLiang commented 6 years ago

Thank you! I just see your reply now and I feel more understanding.