This commit is contained in:
s444501 2023-02-12 14:52:18 +01:00
parent 97754985fc
commit 99b93a2579
2 changed files with 20 additions and 2 deletions

14
README.md Normal file
View File

@ -0,0 +1,14 @@
# Transformer Encoder - RoBERTa
## Modyfikacje
1. ????
# Transformer Decoder - GPT-2
## Modyfikacje
1. ????
# Transformer Encoder-Decoder - T5
## Modyfikacje
1. Zamrożenie pierwszych 20 warstw
# Transformer w trybie few-shot/zero-shot learning - ?????

View File

@ -260,8 +260,12 @@ class DataTrainingArguments:
def freeze_model_weights(model: torch.nn.Module) -> None:
count = 0
for param in model.parameters():
logger.info(count)
param.requires_grad = False
count += 1
if count < 20:
logger.info(f'Freezing layer {count}')
param.requires_grad = False
else:
logger.info(f'Ignoring layer {count}')
def main():