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

Add return for use_gpu..

This commit is contained in:
D-X-Y
2021-03-11 19:28:00 -08:00
parent 593553f573
commit 1d435248e2
11 changed files with 31 additions and 28 deletions

View File

@@ -103,7 +103,7 @@ class GATs(Model):
"\nbase_model : {}"
"\nwith_pretrain : {}"
"\nmodel_path : {}"
"\nvisible_GPU : {}"
"\ndevice : {}"
"\nuse_GPU : {}"
"\nseed : {}".format(
d_feat,
@@ -119,7 +119,7 @@ class GATs(Model):
base_model,
with_pretrain,
model_path,
GPU,
self.device,
self.use_gpu,
seed,
)
@@ -151,7 +151,7 @@ class GATs(Model):
@property
def use_gpu(self):
self.device != torch.device("cpu")
return self.device != torch.device("cpu")
def mse(self, pred, label):
loss = (pred - label) ** 2