Skip to content

Commit 586058f

Browse files
authored
Merge pull request #3 from martinnovaak/adamw
Use AdamW instead of Adam
2 parents 47584e9 + 67123a1 commit 586058f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

trainer/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def load_config(config_path="config.json"):
3434

3535
dataloader = BatchLoader(data_parser_path, paths, batch_size, scale, wdl)
3636

37-
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
37+
optimizer = torch.optim.AdamW(model.parameters(), lr=learning_rate, weight_decay=1e-2)
3838

3939
start_time = time()
4040

0 commit comments

Comments
 (0)