From 305c7a86f65decb5871bf899a9e6da4e97fd98e5 Mon Sep 17 00:00:00 2001 From: Marcus Edel Date: Thu, 3 Oct 2019 21:29:25 +0200 Subject: [PATCH] Expose the instantiated network. --- src/mlpack/methods/ann/ffn.hpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/mlpack/methods/ann/ffn.hpp b/src/mlpack/methods/ann/ffn.hpp index 9e875a16f2..af9ec3ca80 100644 --- a/src/mlpack/methods/ann/ffn.hpp +++ b/src/mlpack/methods/ann/ffn.hpp @@ -257,6 +257,14 @@ class FFN */ void Add(LayerTypes layer) { network.push_back(layer); } + //! Get the network model. + const std::vector >& Model() const + { + return network; + } + //! Modify the network model. + std::vector >& Model() { return network; } + //! Return the number of separable functions (the number of predictor points). size_t NumFunctions() const { return numFunctions; } @@ -265,7 +273,7 @@ class FFN //! Modify the initial point for the optimization. arma::mat& Parameters() { return parameter; } - //! Get the matrix of responses to the input data points. + //! Get the matrix of resposnses to the input data points. const arma::mat& Responses() const { return responses; } //! Modify the matrix of responses to the input data points. arma::mat& Responses() { return responses; }