9295efb21686b4ea5a55dfa1944c4e30bd27794e,examples/deep_dream.py,,deprocess_image,#Any#,72

Before Change


        x = x.reshape((img_height, img_width, 3))
    // Remove zero-center by mean pixel
    x[:, :, 0] += 103.939
    x[:, :, 1] += 116.779
    x[:, :, 2] += 123.68
    // "BGR"->"RGB"
    x = x[:, :, ::-1]
    x = np.clip(x, 0, 255).astype("uint8")
    return x

After Change


        x = x.reshape((3, x.shape[2], x.shape[3]))
        x = x.transpose((1, 2, 0))
    else:
        x = x.reshape((x.shape[1], x.shape[2], 3))
    x /= 2.
    x += 0.5
    x *= 255.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: 9295efb21686b4ea5a55dfa1944c4e30bd27794e
Time: 2017-04-24
Author: francois.chollet@gmail.com
File Name: examples/deep_dream.py
Class Name:
Method Name: deprocess_image


Project Name: NifTK/NiftyNet
Commit Name: baecce5a6fbe4576ca8348a93dc56f07e7ba84f6
Time: 2019-06-05
Author: ucabtmv@ucl.ac.uk
File Name: niftynet/contrib/csv_reader/csv_reader.py
Class Name: CSVReader
Method Name: _parse_csv


Project Name: wkentaro/labelme
Commit Name: 512d9affe75ccddf666ee932acc6bd56d00ce6e7
Time: 2018-02-06
Author: www.kentaro.wada@gmail.com
File Name: labelme/utils.py
Class Name:
Method Name: draw_label


Project Name: OpenNMT/OpenNMT-py
Commit Name: 668c3ef362995c55633fde592354160fec1d1efd
Time: 2019-06-27
Author: dylan.flaute@gmail.com
File Name: onmt/decoders/transformer.py
Class Name: TransformerDecoder
Method Name: forward


Project Name: chainer/chainercv
Commit Name: 5173f180d75df1e751689d37692e729f45e416a6
Time: 2017-05-18
Author: yuyuniitani@gmail.com
File Name: chainercv/links/model/faster_rcnn/region_proposal_network.py
Class Name: RegionProposalNetwork
Method Name: __call__