Same initialization values for wight and bias for several trainings

Hi All,

I trained a CNN model with my original data and now I want to train it again with my original data + augmented data. I am using pytorch. I really appreciate if you let me know how can I get same initialization values for wight and bias when training the CNN model with original data + augmented data.

Did you try setting the random seed to a fixed number? You can set this seed as follows:

torch.manual_seed(0)

See also: Reproducibility.

Thank you very much.

Did it work? It would help others if you report what happened.

Yes, when I check model.stat_dict(), I see that I get same values for weight and bias.

Cool. It will help others if you mark my reply which helped you, as the solution for your question.