%matplotlib inline import numpy as np import chainer import chainer.functions as F import chainer.links as L from chainer import report, training, Chain, datasets, iterators, optimizers from chainer.training import extensions from chainer.datasets import tuple_dataset import matplotlib.pyplot as plt class MLP(Chain): n_input = 1 n_output = 1 n_units = 5 def __init__(self): super(MLP, self).__init_