torchvision.models — Torchvision 0.8.1 documentation
pytorch.org › vision › 0torchvision.models.resnet50(pretrained=False, progress=True, **kwargs) [source] ResNet-50 model from “Deep Residual Learning for Image Recognition” Parameters: pretrained ( bool) – If True, returns a model pre-trained on ImageNet progress ( bool) – If True, displays a progress bar of the download to stderr
torchvision.datasets — Torchvision 0.8.1 documentation
pytorch.org › vision › 0Hence, they can all be passed to a torch.utils.data.DataLoader which can load multiple samples parallelly using torch.multiprocessing workers. For example: imagenet_data = torchvision.datasets.ImageNet('path/to/imagenet_root/') data_loader = torch.utils.data.DataLoader(imagenet_data, batch_size=4, shuffle=True, num_workers=args.nThreads)