- print dataを- print(data)に置換
- from six.moves import rangeを追加し- xrangeを- rangeに置換
python3 から logging が標準ライブラリにあります。import 時に衝突するため、別名に変更する必要があります。
| """ | |
| 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. | 
| # 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( | |
| [ | 
| # -*- coding: utf-8 -*- | |
| require 'twitter' | |
| consumer_key = '' | |
| consumer_secret = '' | |
| access_token = '' | |
| access_token_secret = '' | |
| client = Twitter::REST::Client.new do |config| |