tags # torch
tags # torch device # torch device if cuda # torch get device # torch device variable
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')tags # progress bar refresh rate # progress bar freeze # torch lightning progress refresh # progress bar stuck
-
set refresh rate before constructing progress_bar
-
put into callbacks
mnist_model = MNISTModel()
# prepare progress bar, set refresh rate
our_progress_bar = TQDMProgressBar(refresh_rate=10)
trainer = pl.Trainer(max_epochs=10, callbacks=[our_progress_bar])
trainer.fit(mnist_model)