def _load_pretrained_weights(self, caffemodel_path):
    from chainer.links.caffe.caffe_function import CaffeFunction
    src = CaffeFunction(caffemodel_path)
    self.conv1.W.data[:] = src.conv1.W.data
    self.conv1.b.data[:] = src.conv1.b.data
    self.bn1.avg_mean[:] = src.bn_conv1.avg_mean
    self.bn1.avg_var[:] = src.bn_conv1.avg_var
    self.bn1.gamma.data[:] = src.scale_conv1.W.data
    self.bn1.beta.data[:] = src.scale_conv1.bias.b.data
    self._load_weights_block(self.res2, src, ['2a', '2b', '2c'])
    self._load_weights_block(self.res3, src, ['3a', '3b', '3c', '3d'])
    self._load_weights_block(self.res4, src, ['4a', '4b', '4c', '4d', '4e', '4f'])
    self._load_weights_block(self.res5, src, ['5a', '5b', '5c'])
def _load_pretrained_weights(self, caffemodel_path):
    from chainer.links.caffe.caffe_function import CaffeFunction
    src = CaffeFunction(caffemodel_path)
    self.conv1.W.data[:] = src.conv1.W.data
    self.conv1.b.data[:] = src.conv1.b.data
    self.bn1.avg_mean[:] = src.bn_conv1.avg_mean
    self.bn1.avg_var[:] = src.bn_conv1.avg_var
    self.bn1.gamma.data[:] = src.scale_conv1.W.data
    self.bn1.beta.data[:] = src.scale_conv1.bias.b.data
    self._load_weights_block(self.res2, src, ['2a', '2b', '2c'])
    self._load_weights_block(self.res3, src, ['3a', '3b', '3c', '3d'])
    self._load_weights_block(self.res4, src, ['4a', '4b', '4c', '4d', '4e', '4f'])
    self._load_weights_block(self.res5, src, ['5a', '5b', '5c'])