Don't delete on free---DeleteVisitor() in FFN will do that.
This commit is contained in:
@@ -72,11 +72,6 @@ class GRU
|
||||
const size_t outSize,
|
||||
const size_t rho = std::numeric_limits<size_t>::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.
|
||||
|
||||
@@ -76,17 +76,6 @@ GRU<InputDataType, OutputDataType>::GRU(
|
||||
gradIterator = outParameter.end();
|
||||
}
|
||||
|
||||
template<typename InputDataType, typename OutputDataType>
|
||||
GRU<InputDataType, OutputDataType>::~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<typename InputDataType, typename OutputDataType>
|
||||
template<typename eT>
|
||||
void GRU<InputDataType, OutputDataType>::Forward(
|
||||
|
||||
Reference in New Issue
Block a user