mirror of
https://github.com/microsoft/qlib.git
synced 2026-07-09 22:10:56 +08:00
update
This commit is contained in:
@@ -420,11 +420,11 @@ class SFM(Model):
|
||||
index = x_test.index
|
||||
x_test = torch.from_numpy(x_test.values).float()
|
||||
|
||||
x_test = x_test.to(device)
|
||||
x_test = x_test.to(self.device)
|
||||
self.sfm_model.eval()
|
||||
|
||||
with torch.no_grad():
|
||||
if device != 'cpu':
|
||||
if self.device != 'cpu':
|
||||
preds = self.sfm_model(x_test).detach().cpu().numpy()
|
||||
else:
|
||||
preds = self.sfm_model(x_test).detach().numpy()
|
||||
|
||||
Reference in New Issue
Block a user