d8f9592b209e368e4934b6b429443c2a8673de3f,tests/models/test_mmbt.py,TestMMBTTorchscript,test_finetune_model,#TestMMBTTorchscript#,40
Before Change
def test_finetune_model(self):
model = self.finetune_model.eval()
self.assertTrue(
test_utils.compare_torchscript_transformer_models(
model, vocab_size=BERT_VOCAB_SIZE
)
)
class TestMMBTConfig(unittest.TestCase):
def test_mmbt_from_params(self):
After Change
test_sample.image = torch.rand((3, 300, 300)).float()
test_sample_list = SampleList([test_sample.copy()])
with torch.no_grad():
model_output = self.finetune_model.model(test_sample_list)
test_sample_list = SampleList([test_sample])
script_model = torch.jit.script(self.finetune_model.model)
with torch.no_grad():
script_output = script_model(test_sample_list)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: facebookresearch/pythia
Commit Name: d8f9592b209e368e4934b6b429443c2a8673de3f
Time: 2020-10-19
Author: junchen20@fb.com
File Name: tests/models/test_mmbt.py
Class Name: TestMMBTTorchscript
Method Name: test_finetune_model
Project Name: elbayadm/attn2d
Commit Name: 1082ba352c5f1d524b1fcba43ee611280b169224
Time: 2018-09-25
Author: edunov@apache.org
File Name: fairseq/trainer.py
Class Name: Trainer
Method Name: valid_step