oops optimizer now demands to know device_type

This commit is contained in:
Andrej Karpathy committed 2023-02-05 00:43:15 +00:00
1 parent 34720df284
commit 580902617c
1 file changed
+1 -1
+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...")