From b892f2cfab896dd4f04aa2dd3472f2b5d5646067 Mon Sep 17 00:00:00 2001 From: Ryan Curtin Date: Sun, 22 Mar 2020 16:42:38 -0400 Subject: [PATCH] Don't delete on free---DeleteVisitor() in FFN will do that. --- src/mlpack/methods/ann/layer/gru.hpp | 5 ----- src/mlpack/methods/ann/layer/gru_impl.hpp | 11 ----------- 2 files changed, 16 deletions(-) diff --git a/src/mlpack/methods/ann/layer/gru.hpp b/src/mlpack/methods/ann/layer/gru.hpp index ef82ce0e82..52dd2730c3 100644 --- a/src/mlpack/methods/ann/layer/gru.hpp +++ b/src/mlpack/methods/ann/layer/gru.hpp @@ -72,11 +72,6 @@ class GRU const size_t outSize, const size_t rho = std::numeric_limits::max()); - /** - * Delete the GRU and the layers it holds. - */ - ~GRU(); - /** * Ordinary feed forward pass of a neural network, evaluating the function * f(x) by propagating the activity forward through f. diff --git a/src/mlpack/methods/ann/layer/gru_impl.hpp b/src/mlpack/methods/ann/layer/gru_impl.hpp index b2e7cee39d..b5eb914468 100644 --- a/src/mlpack/methods/ann/layer/gru_impl.hpp +++ b/src/mlpack/methods/ann/layer/gru_impl.hpp @@ -76,17 +76,6 @@ GRU::GRU( gradIterator = outParameter.end(); } -template -GRU::~GRU() -{ - boost::apply_visitor(deleteVisitor, input2GateModule); - boost::apply_visitor(deleteVisitor, output2GateModule); - boost::apply_visitor(deleteVisitor, outputHidden2GateModule); - boost::apply_visitor(deleteVisitor, inputGateModule); - boost::apply_visitor(deleteVisitor, forgetGateModule); - boost::apply_visitor(deleteVisitor, hiddenStateModule); -} - template template void GRU::Forward(