738c8758e30c6f8bdf9155529aeb431547af65d6,python/caffe/pycaffe.py,,_Net_set_mean,#,184
Before Change
raise Exception("Input not in {}".format(self.inputs))
mean = np.load(mean_f)
if mode == "elementwise":
if mean.shape != self.input.data.shape[1:]:
raise Exception("The mean shape does not match the input shape.")
self.mean[input_] = mean
elif mode == "channel":
self.mean[input_] = mean.mean(1).mean(1)
else:
After Change
in_shape = self.blobs[input_].data.shape
mean = np.load(mean_f)
if mode == "elementwise":
if mean.shape != in_shape[1:]:
mean = caffe.io.resize_image(mean.transpose((1,2,0)),
in_shape[2:]).transpose((2,0,1))
self.mean[input_] = mean
elif mode == "channel":
self.mean[input_] = mean.mean(1).mean(1).reshape((in_shape[1], 1, 1))
else:

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: BVLC/caffe
Commit Name: 738c8758e30c6f8bdf9155529aeb431547af65d6
Time: 2014-05-19
Author: shelhamer@imaginarynumber.net
File Name: python/caffe/pycaffe.py
Class Name:
Method Name: _Net_set_mean
Project Name: ncullen93/torchsample
Commit Name: 80df9d12f27654b5d21d9833dfe2f9636aa37863
Time: 2017-05-05
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/tensor_transforms.py
Class Name: TypeCast
Method Name: __call__
Project Name: ncullen93/torchsample
Commit Name: 2079a72d90e527149e527b5cb376b37ddc9e25bd
Time: 2017-05-09
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/affine_transforms.py
Class Name: Affine
Method Name: __init__