1a6d4020c53e2b39e224616481528fad901cbd4e,deeppavlov/core/commands/infer.py,,predict_on_stream,#Any#Any#Any#,116
Before Change
while True:
batch = (l.strip() for l in islice(f, batch_size*args_count))
if args_count > 1:
batch = zip(*[batch] *args_count)
batch = list(batch)
if not batch:
break
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: 3
Non-data size: 6
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: tensorlayer/tensorlayer
Commit Name: 641a28fbf0daff0ad1ad0f43d2c4b545cb6f9656
Time: 2019-02-16
Author: dhsig552@163.com
File Name: examples/reinforcement_learning/tutorial_cartpole_ac.py
Class Name: Critic
Method Name: learn
Project Name: tensorlayer/tensorlayer
Commit Name: 641a28fbf0daff0ad1ad0f43d2c4b545cb6f9656
Time: 2019-02-16
Author: dhsig552@163.com
File Name: examples/reinforcement_learning/tutorial_cartpole_ac.py
Class Name: Actor
Method Name: learn