1a6d4020c53e2b39e224616481528fad901cbd4e,deeppavlov/core/commands/infer.py,,predict_on_stream,#Any#Any#Any#,116
Before Change
break
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)
After Change
if not batch:
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):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: explosion/thinc
Commit Name: 61dce6375e39c20f571049161da2a341f2592393
Time: 2017-01-28
Author: honnibal@gmail.com
File Name: thinc/tests/integration/test_basic_tagger.py
Class Name:
Method Name: test_small_end_to_end
Project Name: NVIDIA/OpenSeq2Seq
Commit Name: b0728e31f312bc703ab227b6ff69f0a92b3dba07
Time: 2018-05-17
Author: igor.a.gitman@gmail.com
File Name: open_seq2seq/utils/utils.py
Class Name:
Method Name: cast_types