08f051c1d42c71836b672dfcf7c0c57b4c63859e,test.py,,test,#Any#Any#Any#Any#Any#Any#Any#Any#,10
Before Change
if weights.endswith(".pt"): // pytorch format
checkpoint = torch.load(weights, map_location="cpu")
model.load_state_dict(checkpoint["model"])
del checkpoint
else: // darknet format
load_darknet_weights(model, weights)
model.to(device).eval()
After Change
// Load weights
if weights.endswith(".pt"): // pytorch format
model.load_state_dict(torch.load(weights, map_location="cpu")["model"])
else: // darknet format
load_darknet_weights(model, weights)
model.to(device).eval()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: ultralytics/yolov3
Commit Name: 08f051c1d42c71836b672dfcf7c0c57b4c63859e
Time: 2019-02-08
Author: glenn.jocher@ultralytics.com
File Name: test.py
Class Name:
Method Name: test
Project Name: pytorch/fairseq
Commit Name: 86793391e38bf88c119699bfb1993cb0a7a33968
Time: 2020-01-11
Author: myleott@fb.com
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: load_checkpoint