import numpy as np import matplotlib.pyplot as plt import chainer from chainer import cuda, Function, gradient_check, Variable, optimizers, serializers, utils from chainer import Link, Chain, ChainList import chainer.functions as F import chainer.links as L class MyChain(Chain): def __init__(self): super(MyChain, self).__init__( l1 = L.Linear(1, 10), l2 = L.Linear(10, 1), ) def __call__(self, x):