1a6d4020c53e2b39e224616481528fad901cbd4e,deeppavlov/core/commands/infer.py,,predict_on_stream,#Any#Any#Any#,116
Before Change
for res in model(batch):
if type(res).__module__ == "numpy":
res = res.tolist()
if not isinstance(res, str):
res = json.dumps(res, ensure_ascii=False)
print(res, flush=True)
if f is not sys.stdin:
f.close()
After Change
break
args = []
for i in range(args_count):
args.append(batch[i::args_count])
res = model(*args)
if len(model.out_params) == 1:
res = [res]
for res in zip(*res):
res = json.dumps(res, ensure_ascii=False)
print(res, flush=True)
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances
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: KaiyangZhou/deep-person-reid
Commit Name: 31a88a7675f0982a050cc2af40f3edc726b606a5
Time: 2018-04-26
Author: k.zhou@qmul.ac.uk
File Name: models/HACNN.py
Class Name:
Method Name:
Project Name: hunkim/PyTorchZeroToAll
Commit Name: 55b880469ced115de9949d5d25ff835dabbb2caa
Time: 2017-11-08
Author: hunkim@gmail.com
File Name: 12_2_hello_rnn.py
Class Name:
Method Name:
Project Name: chainer/chainerrl
Commit Name: 67d13b4ba91b23ad29f660aae68a01ddbd809530
Time: 2018-10-16
Author: muupan@gmail.com
File Name: chainerrl/agents/ppo.py
Class Name: PPO
Method Name: act_and_train