Skip to content

Commit

Permalink
resnet50
Browse files Browse the repository at this point in the history
  • Loading branch information
sunbing7 committed Jun 12, 2023
1 parent 839d205 commit 1bcc84c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src_torch/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ def get_dataloader(dataset, train=True, ratio=1.0, batch_size=128):
elif dataset == 'mnistm':
dataset = CustomMNISTMDataSet(data_root, train, transform)
elif dataset == 'asl' or dataset == 'caltech':
if dataset == 'caltech':
transforms_list = []
transforms_list.append(transforms.ToTensor())
transforms.CenterCrop(size=224),
# transforms_list.append(transforms.Normalize(_mean[dataset], _std[dataset]))
transform = transforms.Compose(transforms_list)
dataset = get_custom_folder(data_root + '/' + str(dataset), train, transform)
else:
raise Exception('Invalid dataset')
Expand Down

0 comments on commit 1bcc84c

Please sign in to comment.