85b09a95187fbaaf00ad513320a8df722be1b204,examples/pytorch_imagenet_resnet50.py,,,#,15

Before Change


// Horovod: restore on the first worker which will broadcast weights to other workers.
if resume_from_epoch > 0 and hvd.rank() == 0:
    checkpoint = torch.load(args.checkpoint_format.format(epoch=resume_from_epoch))
    model.load_state_dict(checkpoint)

// Horovod: broadcast parameters.
hvd.broadcast_parameters(model.state_dict(), root_rank=0)

After Change


    filepath = args.checkpoint_format.format(epoch=resume_from_epoch)
    checkpoint = torch.load(filepath)
    model.load_state_dict(checkpoint["model"])
    optimizer.load_state_dict(checkpoint["optimizer"])

// Horovod: broadcast parameters.
hvd.broadcast_parameters(model.state_dict(), root_rank=0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: horovod/horovod
Commit Name: 85b09a95187fbaaf00ad513320a8df722be1b204
Time: 2018-07-13
Author: tgaddair@gmail.com
File Name: examples/pytorch_imagenet_resnet50.py
Class Name:
Method Name:


Project Name: facebookresearch/ParlAI
Commit Name: 49c673dd5a25462651f2f9f8a516c5c43e4b8d9f
Time: 2017-08-29
Author: belbs@users.noreply.github.com
File Name: parlai/agents/memnn/memnn.py
Class Name: MemnnAgent
Method Name: load


Project Name: pytorch/tutorials
Commit Name: 2f5299a546fe23e2fff46630fc319387724b9aa5
Time: 2018-08-29
Author: minkawhich@fb.com
File Name: beginner_source/chatbot_tutorial.py
Class Name:
Method Name:


Project Name: mozilla/TTS
Commit Name: 50fee59a2c60ca711b7959baa1711d586aa49758
Time: 2021-01-21
Author: erogol@hotmail.com
File Name: TTS/server/synthesizer.py
Class Name: Synthesizer
Method Name: load_vocoder