mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-15 08:46:56 +08:00
update run_all_model and black format
This commit is contained in:
@@ -24,6 +24,7 @@ from ...model.base import Model
|
||||
from ...data.dataset import DatasetH, TSDatasetH
|
||||
from ...data.dataset.handler import DataHandlerLP
|
||||
from torch.nn.modules.container import ModuleList
|
||||
|
||||
# qrun examples/benchmarks/Localformer/workflow_config_localformer_Alpha360.yaml ”
|
||||
|
||||
|
||||
@@ -150,8 +151,8 @@ class LocalformerModel(Model):
|
||||
if len(indices) - i < self.batch_size:
|
||||
break
|
||||
|
||||
feature = torch.from_numpy(x_values[indices[i: i + self.batch_size]]).float().to(self.device)
|
||||
label = torch.from_numpy(y_values[indices[i: i + self.batch_size]]).float().to(self.device)
|
||||
feature = torch.from_numpy(x_values[indices[i : i + self.batch_size]]).float().to(self.device)
|
||||
label = torch.from_numpy(y_values[indices[i : i + self.batch_size]]).float().to(self.device)
|
||||
|
||||
with torch.no_grad():
|
||||
pred = self.model(feature)
|
||||
|
||||
Reference in New Issue
Block a user