1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-15 00:36:55 +08:00

Update devices

This commit is contained in:
Jactus
2020-12-02 13:28:32 +08:00
parent 7f385345bb
commit 745b93138d
6 changed files with 6 additions and 6 deletions

View File

@@ -79,7 +79,7 @@ class DNNModelPytorch(Model):
self.lr_decay_steps = lr_decay_steps
self.optimizer = optimizer.lower()
self.loss_type = loss
self.device = "cuda:%d" % (GPU) if torch.cuda.is_available() else "cpu"
self.device = torch.device("cuda:%d" % (GPU) if torch.cuda.is_available() else "cpu")
self.use_GPU = torch.cuda.is_available()
self.seed = seed