13287043443135f6f3f8ed787d3978866c390d81,test.py,,,#,71

Before Change


            input = data["input"]
            if not args.cpu:
                input = input.cuda()
            output = model(input, args.scale).cpu() + data["bicubic"]
            sr_img = tensor2im(output, mean, stddev)
            toc = time.time()
            if "target" in data:

After Change


            tic = time.time()
            // split image in chuncks of max-dimension
            if args.max_dimension:
                data_chunks = DataChunks({"input":data["input"]},
                                         args.max_dimension,
                                         args.padding,args.scale)
                for chunk in data_chunks.iter():
                    input = chunk["input"]
                    if not args.cpu:
                        input = input.cuda()
                    output = model.predict(input,{},args.scale)
                    data_chunks.gather(output)
                output = data_chunks.concatenate() + data["bicubic"]
            else:
                input = data["input"]
                if not args.cpu:
                    input = input.cuda()
                output = model.predict(input,data,args.scale)
            sr_img = tensor2im(output, mean, stddev)
            toc = time.time()
            if "target" in data:
                hr_img = tensor2im(data["target"], mean, stddev)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: fperazzi/proSR
Commit Name: 13287043443135f6f3f8ed787d3978866c390d81
Time: 2019-03-27
Author: fperazzi@adobe.com
File Name: test.py
Class Name:
Method Name:


Project Name: deepmipt/DeepPavlov
Commit Name: 1a6d4020c53e2b39e224616481528fad901cbd4e
Time: 2018-10-15
Author: yoptar@gmail.com
File Name: deeppavlov/core/commands/infer.py
Class Name:
Method Name: predict_on_stream


Project Name: HazyResearch/fonduer
Commit Name: 4b3109514fc75d0cd3e7303576ec32e6cf2a1724
Time: 2018-08-24
Author: jrausch@inf.ethz.ch
File Name: fonduer/parser/spacy_parser.py
Class Name: Spacy
Method Name: parse


Project Name: tensorflow/tpu
Commit Name: 4be0f638ed7b73dbf0777320df374e91cce79144
Time: 2018-04-14
Author: huangyp@google.com
File Name: models/official/retinanet/retinanet_model.py
Class Name:
Method Name: _model_fn


Project Name: fperazzi/proSR
Commit Name: 13287043443135f6f3f8ed787d3978866c390d81
Time: 2019-03-27
Author: fperazzi@adobe.com
File Name: test.py
Class Name:
Method Name: