4e33a87b602d9236443d50b56e2cac291eda42eb,allennlp/models/model.py,Model,forward_on_instances,#Model#Any#,124
Before Change
batch_size = len(instances)
//with torch.no_grad():
cuda_device = self._get_prediction_device()
dataset = Batch(instances)
dataset.index_instances(self.vocab)
model_input = util.move_to_device(dataset.as_tensor_dict(), cuda_device)
outputs = self.decode(self(**model_input))
instance_separated_output: List[Dict[str, numpy.ndarray]] = [
After Change
batch_size = len(instances)
with torch.no_grad():
cuda_device = self._get_prediction_device()
dataset = Batch(instances)
dataset.index_instances(self.vocab)
model_input = util.move_to_device(dataset.as_tensor_dict(), cuda_device)
outputs = self.decode(self(**model_input))
instance_separated_output: List[Dict[str, numpy.ndarray]] = [
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: allenai/allennlp
Commit Name: 4e33a87b602d9236443d50b56e2cac291eda42eb
Time: 2019-10-09
Author: mattg@allenai.org
File Name: allennlp/models/model.py
Class Name: Model
Method Name: forward_on_instances
Project Name: jsalt18-sentence-repl/jiant
Commit Name: e05be082b5bc4677576e853792264d4c14f0c44d
Time: 2018-04-05
Author: wang.alex.c@gmail.com
File Name: src/preprocess.py
Class Name:
Method Name: process_task
Project Name: allenai/allennlp
Commit Name: 135db83a151179715e32e9093cde0ac9bd17ec20
Time: 2019-10-04
Author: eswallace@comcast.net
File Name: allennlp/models/model.py
Class Name: Model
Method Name: forward_on_instances