fc48d5de5c95255ad98eea8666910482235b1c75,python/caffe/pycaffe.py,,_Net_deprocess,#,276

Before Change


    input_scale = self.input_scale.get(input_name)
    channel_order = self.channel_swap.get(input_name)
    mean = self.mean.get(input_name)
    if mean is not None:
        decaf_in += mean
    decaf_in = decaf_in.transpose((1,2,0))
    if channel_order:
        channel_order_inverse = [channel_order.index(i)
                                 for i in range(decaf_in.shape[2])]

After Change


    decaf_in = input_.copy().squeeze()
    input_scale = self.input_scale.get(input_name)
    channel_order = self.channel_swap.get(input_name)
    if hasattr(self, "mean"):
        decaf_in += self.mean.get(input_name, 0)
    decaf_in = decaf_in.transpose((1,2,0))
    if channel_order:
        channel_order_inverse = [channel_order.index(i)
                                 for i in range(decaf_in.shape[2])]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: BVLC/caffe
Commit Name: fc48d5de5c95255ad98eea8666910482235b1c75
Time: 2014-07-18
Author: jonlong@cs.berkeley.edu
File Name: python/caffe/pycaffe.py
Class Name:
Method Name: _Net_deprocess


Project Name: tristandeleu/pytorch-maml-rl
Commit Name: 01b8f6eef41c36f12019adfc23ace2a100d77610
Time: 2019-11-24
Author: tristan.deleu@gmail.com
File Name: maml_rl/envs/sync_vector_env.py
Class Name: SyncVectorEnv
Method Name: __init__


Project Name: openai/gym
Commit Name: 2e8141b00ddd3a76238abe95b44d56a39bc90885
Time: 2019-03-08
Author: christopherhesse@users.noreply.github.com
File Name: gym/envs/box2d/car_racing.py
Class Name: CarRacing
Method Name: render


Project Name: BVLC/caffe
Commit Name: fc48d5de5c95255ad98eea8666910482235b1c75
Time: 2014-07-18
Author: jonlong@cs.berkeley.edu
File Name: python/caffe/pycaffe.py
Class Name:
Method Name: _Net_preprocess