Skip to content

Instantly share code, notes, and snippets.

@tommyfms2
tommyfms2 / data.txt
Last active October 7, 2017 02:03
chainerのデータセットの作り方 LinearやCNN ref: http://qiita.com/tommyfms2/items/c3fa0cb258c17468cb30
...
0,0,11,1,388,484,236,268,500,260,212,392,324,220,216,412,204,244,252,292,4,447,403,589,471,434,448,450,430,410,4,434,448,450,430,410,410,410,410,410,1
0,30,11,0,308,368,324,264,372,384,276,216,372,248,212,192,260,204,208,192,4,434,448,450,430,410,410,410,410,410,4,560,220,238,217,305,267,231,202,185,5
0,0,30,1,216,264,268,236,248,272,244,216,284,236,232,180,280,236,188,188,4,560,220,238,217,305,267,231,202,185,4,305,267,231,202,185,185,185,185,185,3
0,30,5,0,220,192,188,188,184,196,204,184,208,188,188,168,204,200,192,160,4,305,267,231,202,185,185,185,185,185,4,418,418,418,418,418,418,418,418,418,5
...
@tommyfms2
tommyfms2 / file0.txt
Last active October 19, 2016 06:47
chainer 1.11.0以降のmnistを解説 ref: http://qiita.com/tommyfms2/items/a2f23acbf515fba3495b
class MLP(chainer.Chain):
def __init__(self, n_in, n_units, n_out):
super(MLP, self).__init__(
l1=L.Linear(n_in, n_units),
l2=L.Linear(n_units, n_units),
l3=L.Linear(n_units, n_out),
)
def __call__(self, x):
h1 = F.relu(self.l1(x))