Skip to content

Instantly share code, notes, and snippets.

View nzw0301's full-sized avatar

Kento Nozawa nzw0301

  • Preferred Networks, Inc. / Preferred Elements, Inc.
  • Japan
  • 03:11 (UTC +09:00)
View GitHub Profile
# CIFAR-100
import numpy as np
import torchvision.transforms as transforms
from torch.utils.data import DataLoader
from torchvision.datasets import CIFAR100
train_transform = transforms.Compose(
[
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
Modification version of https://github.com/optuna/optuna/pull/2303 with nccl backend
Optuna example that optimizes multi-layer perceptrons using PyTorch distributed.
In this example, we optimize the validation accuracy of hand-written digit recognition using
PyTorch distributed data parallel and MNIST. We optimize the neural network architecture as well
as the optimizer configuration. As it is too time consuming to use the whole MNIST dataset, we
here use a small subset of it.