def __init__(self):
self.dtype = np.float16
W = initializers.HeNormal(1 / np.sqrt(2), self.dtype)
bias = initializers.Zero(self.dtype)
chainer.Chain.__init__(
self,
conv1=L.Convolution2D(None, 96, 11,
stride=4, initialW=W, bias=bias),
conv2=L.Convolution2D(None, 256, 5, pad=2, initialW=W, bias=bias),
conv3=L.Convolution2D(None, 384, 3, pad=1, initialW=W, bias=bias),
conv4=L.Convolution2D(None, 384, 3, pad=1, initialW=W, bias=bias),
conv5=L.Convolution2D(None, 256, 3, pad=1, initialW=W, bias=bias),
fc6=L.Linear(None, 4096, initialW=W, bias=bias),
fc7=L.Linear(None, 4096, initialW=W, bias=bias),
fc8=L.Linear(None, 1000, initialW=W, bias=bias),
)
self.train = True
评论列表
文章目录