b939c910d036d8197ac7c63e5f188bc4c4fc4803,foolbox/batching.py,,run_parallel,#Any#Any#Any#Any#Any#Any#Any#Any#,94
Before Change
// get original shape (//attacks, batch size)
batch_shape = batched_predictions_args[0].shape
// merge individual batches into one super-batch
batched_predictions_args[0] = batched_predictions_args[0].reshape(
-1, *batch_shape[2:])
batched_predictions = model.forward(*batched_predictions_args)
// split super-batch back into individual batches
batched_predictions = batched_predictions.reshape(
After Change
// split super-batch back into individual batches
batched_predictions = model.forward(inputs)
batched_predictions = np.split(batched_predictions, batch_splits,
axis=0)
else:
batched_predictions = []
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: bethgelab/foolbox
Commit Name: b939c910d036d8197ac7c63e5f188bc4c4fc4803
Time: 2019-07-20
Author: rzrolandzimmermann@gmail.com
File Name: foolbox/batching.py
Class Name:
Method Name: run_parallel
Project Name: dpressel/mead-baseline
Commit Name: 4b4946f40ef0f8c533f5473ec3756e639e57e5c5
Time: 2018-09-28
Author: dpressel@gmail.com
File Name: python/baseline/dy/dynety.py
Class Name:
Method Name: show_examples_dynet
Project Name: IndicoDataSolutions/finetune
Commit Name: fd41100b024ce71ae1792c3a560a3fa9ab7c062d
Time: 2018-08-07
Author: benlt@hotmail.co.uk
File Name: finetune/network_modules.py
Class Name:
Method Name: multi_choice_question