b0a116e3fe579f1bbded4ac75382588b6d3fd381,imagenet/main.py,,main,#,56
Before Change
normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],
std=[0.229, 0.224, 0.225])
train_loader = torch.utils.data.DataLoader(
datasets.ImageFolder(traindir, transforms.Compose([
transforms.RandomSizedCrop(224),
transforms.RandomHorizontalFlip(),
transforms.ToTensor(),
normalize,
])),
batch_size=args.batch_size, shuffle=True,
num_workers=args.workers, pin_memory=True)
val_loader = torch.utils.data.DataLoader(
datasets.ImageFolder(valdir, transforms.Compose([
transforms.Scale(256),
After Change
normalize,
]))
if args.distributed:
train_sampler = torch.utils.data.distributed.DistributedSampler(train_dataset)
else:
train_sampler = None
train_loader = torch.utils.data.DataLoader(
train_dataset, batch_size=args.batch_size, shuffle=(train_sampler is None),
num_workers=args.workers, pin_memory=True, sampler=train_sampler)
val_loader = torch.utils.data.DataLoader(
datasets.ImageFolder(valdir, transforms.Compose([
transforms.Scale(256),
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: pytorch/examples
Commit Name: b0a116e3fe579f1bbded4ac75382588b6d3fd381
Time: 2017-07-28
Author: adam.paszke@gmail.com
File Name: imagenet/main.py
Class Name:
Method Name: main
Project Name: kenshohara/3D-ResNets-PyTorch
Commit Name: cafbafcfa19b93e4b85d1a6a523c274b7641d3df
Time: 2019-09-03
Author: kensho.hara@aist.go.jp
File Name: main.py
Class Name:
Method Name: get_train_utils
Project Name: HyperGAN/HyperGAN
Commit Name: 7c83acdf42df2a9bf4d4cfaf4af7d8e848d9f78f
Time: 2020-12-10
Author: mikkel@255bits.com
File Name: examples/classification.py
Class Name: InputLoader
Method Name: __init__