b6443232013e8d248fe26f59630d43bc9688df06,train.py,,,#,21

Before Change


		optimizer.zero_grad()


		classification, regression, anchors, transformed_anchors = model(data["img"].cuda().float())
		if data["annot"][0, 0, 4] == -1:
			continue

After Change


model = model.resnet18(pretrained=True)

dataset_train = CocoDataset("../coco/", set_name="train2017", transform=transforms.Compose([Resizer(), ToTensor()]))
dataset_val = CocoDataset("../coco/", set_name="val2017", transform=transforms.Compose([Resizer(), ToTensor()]))

dataloader_train = DataLoader(dataset_train, batch_size=1, shuffle=True, num_workers=4, collate_fn=collater)
dataloader_val   = DataLoader(dataset_val, batch_size=1, shuffle=True, num_workers=4, collate_fn=collater)

use_gpu = True

if use_gpu:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: yhenon/pytorch-retinanet
Commit Name: b6443232013e8d248fe26f59630d43bc9688df06
Time: 2018-04-29
Author: yannhenon@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: ray-project/ray
Commit Name: b71c912da70e307ff1a9f07c7ca277a727306126
Time: 2020-07-05
Author: rliaw@berkeley.edu
File Name: python/ray/tune/tests/tutorial.py
Class Name:
Method Name: train_mnist


Project Name: milesial/Pytorch-UNet
Commit Name: 4af6e54bd4e1c642282fe512d97aa5a09ce16fca
Time: 2018-06-16
Author: ziyuantony@gmail.com
File Name: predict.py
Class Name:
Method Name: predict_img