bfc638d502b8b991e6ef5aaaa1946049312e6336,python/caffe/io.py,Transformer,set_mean,#Transformer#Any#Any#,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


                ms = (1,) + ms
            if len(ms) != 3:
                raise ValueError("Mean shape invalid")
            if ms != self.inputs[in_][1:]:
                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):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

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: keras-team/keras
Commit Name: 0f4fec30f00b29aa206e36fe875c83ff6149b618
Time: 2017-02-06
Author: yves@dbtune.org
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: batch_dot


Project Name: apple/coremltools
Commit Name: 78adbaaec2faf642d679faf1bc1ffb3b50c4a53f
Time: 2020-07-13
Author: dawergitesh@gmail.com
File Name: coremltools/converters/mil/frontend/torch/ops.py
Class Name:
Method Name: lstm