Skip to content

Commit 0fa66db

Browse files
authored
Merge pull request official-stockfish#272 from Naphthalin/fix_root_device
Added missing .strategy
2 parents c15e33c + bf1e43a commit 0fa66db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def main():
146146
checkpoint_callback = pl.callbacks.ModelCheckpoint(save_last=args.save_last_network, every_n_epochs=args.network_save_period, save_top_k=-1)
147147
trainer = pl.Trainer.from_argparse_args(args, callbacks=[checkpoint_callback], logger=tb_logger)
148148

149-
main_device = trainer.root_device if trainer.strategy.root_device.index is None else 'cuda:' + str(trainer.strategy.root_device.index)
149+
main_device = trainer.strategy.root_device if trainer.strategy.root_device.index is None else 'cuda:' + str(trainer.strategy.root_device.index)
150150

151151
nnue.to(device=main_device)
152152

0 commit comments

Comments
 (0)