1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-11 23:06:58 +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

@@ -86,8 +86,8 @@ class TabnetModel(Model):
"TabNet:"
"\nbatch_size : {}"
"\nvirtual bs : {}"
"\nGPU : {}"
"\npretrain: {}".format(self.batch_size, vbs, GPU, pretrain)
"\ndevice : {}"
"\npretrain: {}".format(self.batch_size, vbs, self.device, self.pretrain)
)
self.fitted = False
np.random.seed(self.seed)
@@ -118,7 +118,7 @@ class TabnetModel(Model):
@property
def use_gpu(self):
self.device != torch.device("cpu")
return self.device != torch.device("cpu")
def pretrain_fn(self, dataset=DatasetH, pretrain_file="./pretrain/best.model"):
get_or_create_path(pretrain_file)