From bc0b938cfc57e2e38b09df35f310365fb9d6e7b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Montan=CC=83ana?= Date: Thu, 21 Mar 2024 19:35:08 +0100 Subject: [PATCH] Remove dataset clone in BoostAODE --- bayesnet/ensembles/BoostAODE.cc | 2 -- bayesnet/ensembles/BoostAODE.h | 1 - 2 files changed, 3 deletions(-) diff --git a/bayesnet/ensembles/BoostAODE.cc b/bayesnet/ensembles/BoostAODE.cc index 745042c..058c947 100644 --- a/bayesnet/ensembles/BoostAODE.cc +++ b/bayesnet/ensembles/BoostAODE.cc @@ -40,8 +40,6 @@ namespace bayesnet { if (convergence) { // Prepare train & validation sets from train data auto fold = folding::StratifiedKFold(5, y_, 271); - // save input dataset - dataset_ = torch::clone(dataset); auto [train, test] = fold.getFold(0); auto train_t = torch::tensor(train); auto test_t = torch::tensor(test); diff --git a/bayesnet/ensembles/BoostAODE.h b/bayesnet/ensembles/BoostAODE.h index 5849b2a..6ae8544 100644 --- a/bayesnet/ensembles/BoostAODE.h +++ b/bayesnet/ensembles/BoostAODE.h @@ -16,7 +16,6 @@ namespace bayesnet { void trainModel(const torch::Tensor& weights) override; private: std::vector initializeModels(); - torch::Tensor dataset_; // Backup the original dataset torch::Tensor X_train, y_train, X_test, y_test; // Hyperparameters bool bisection = false; // if true, use bisection stratety to add k models at once to the ensemble