Align BasePyTorchRegressor tensors to cpu as in BasePyTorchClassifier

This commit is contained in:
Tommaso Falchi
2023-05-05 15:43:48 +02:00
parent 306dfc4ae8
commit 908a2e817a

View File

@@ -45,6 +45,5 @@ class BasePyTorchRegressor(BasePyTorchModel):
device=self.device
)
y = self.model.model(x)
y = y.cpu()
pred_df = DataFrame(y.detach().numpy(), columns=[dk.label_list[0]])
pred_df = DataFrame(y.detach().tolist(), columns=[dk.label_list[0]])
return (pred_df, dk.do_predict)