1
0
mirror of https://github.com/microsoft/qlib.git synced 2026-07-15 00:36:55 +08:00
This commit is contained in:
Jactus
2020-12-02 12:23:42 +08:00
parent a2603fe27a
commit d109d3d44e
6 changed files with 6 additions and 6 deletions

View File

@@ -135,7 +135,7 @@ class ALSTM(Model):
self.ALSTM_model.cuda()
# set the visible GPU
if self.visible_GPU:
os.environ["CUDA_VISIBLE_DEVICES"] = self.visible_GPU
os.environ["CUDA_VISIBLE_DEVICES"] = str(self.visible_GPU)
def mse(self, pred, label):
loss = (pred - label) ** 2

View File

@@ -147,7 +147,7 @@ class GATs(Model):
self.GAT_model.cuda()
# set the visible GPU
if self.visible_GPU:
os.environ["CUDA_VISIBLE_DEVICES"] = self.visible_GPU
os.environ["CUDA_VISIBLE_DEVICES"] = str(self.visible_GPU)
def mse(self, pred, label):
loss = (pred - label) ** 2

View File

@@ -135,7 +135,7 @@ class GRU(Model):
self.gru_model.cuda()
# set the visible GPU
if self.visible_GPU:
os.environ["CUDA_VISIBLE_DEVICES"] = self.visible_GPU
os.environ["CUDA_VISIBLE_DEVICES"] = str(self.visible_GPU)
def mse(self, pred, label):
loss = (pred - label) ** 2

View File

@@ -135,7 +135,7 @@ class LSTM(Model):
self.lstm_model.cuda()
# set the visible GPU
if self.visible_GPU:
os.environ["CUDA_VISIBLE_DEVICES"] = self.visible_GPU
os.environ["CUDA_VISIBLE_DEVICES"] = str(self.visible_GPU)
def mse(self, pred, label):
loss = (pred - label) ** 2

View File

@@ -151,7 +151,7 @@ class DNNModelPytorch(Model):
self.dnn_model.cuda()
# set the visible GPU
if self.visible_GPU:
os.environ["CUDA_VISIBLE_DEVICES"] = self.visible_GPU
os.environ["CUDA_VISIBLE_DEVICES"] = str(self.visible_GPU)
def fit(
self,