Exemplo n.º 1
0
 def test_transformer_decoder_freeze(self):
     torch.manual_seed(self.seed)
     encoder = TransformerDecoder(freeze=True)
     for n, p in encoder.named_parameters():
         self.assertFalse(p.requires_grad)
Exemplo n.º 2
0
 def test_transformer_decoder_freeze(self):
     decoder = TransformerDecoder(freeze=True)
     for n, p in decoder.named_parameters():
         self.assertFalse(p.requires_grad)