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)
def test_transformer_decoder_freeze(self): decoder = TransformerDecoder(freeze=True) for n, p in decoder.named_parameters(): self.assertFalse(p.requires_grad)