bfc638d502b8b991e6ef5aaaa1946049312e6336,python/caffe/io.py,Transformer,set_mean,#Transformer#,236
Before Change
ms = (1,) + ms
if len(ms) != 3:
raise ValueError("Mean shape invalid")
if ms != self.inputs[in_][1:]:
raise ValueError("Mean shape incompatible with input shape.")
self.mean[in_] = mean
def set_input_scale(self, in_, scale):
After Change
in_shape = self.inputs[in_][1:]
m_min, m_max = mean.min(), mean.max()
normal_mean = (mean - m_min) / (m_max - m_min)
mean = resize_image(normal_mean.transpose((1,2,0)),
in_shape[1:]).transpose((2,0,1)) * \
(m_max - m_min) + m_min
self.mean[in_] = mean
def set_input_scale(self, in_, scale):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: BVLC/caffe
Commit Name: bfc638d502b8b991e6ef5aaaa1946049312e6336
Time: 2017-11-02
Author: geunsik.lim@samsung.com
File Name: python/caffe/io.py
Class Name: Transformer
Method Name: set_mean
Project Name: Esri/raster-functions
Commit Name: 1aff9ce62a0c9db7f02b93830fed4073fed49bd1
Time: 2015-02-02
Author: jwasilkowski@esri.com
File Name: functions/LinearSpectralUnmixing.py
Class Name: LinearSpectralUnmixing
Method Name: updatePixels
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