1
0
mirror of https://github.com/osmarks/nanogpt-experiments.git synced 2026-06-01 02:02:08 +00:00

oops optimizer now demands to know device_type

This commit is contained in:
Andrej Karpathy
2023-02-05 00:43:15 +00:00
parent 34720df284
commit 580902617c
+1 -1
View File
@@ -57,7 +57,7 @@ gptconf = GPTConfig(
model = GPT(gptconf)
model.to(device)
optimizer = model.configure_optimizers(weight_decay=1e-2, learning_rate=1e-4, betas=(0.9, 0.95))
optimizer = model.configure_optimizers(weight_decay=1e-2, learning_rate=1e-4, betas=(0.9, 0.95), device_type=device_type)
if compile:
print("Compiling model...")