[mlpack-git] master: Minor misspelling and style fix. (345645d)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Sat Aug 29 08:23:35 EDT 2015


Repository : https://github.com/mlpack/mlpack

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/ea45ace1ff744390a4c35183528eda881eda5c61...fd336238de224ed72fc23b84e1e2f02ae3c879d6

>---------------------------------------------------------------

commit 345645da0b62469de7dcbb79a50de3ed8ee987be
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date:   Wed Aug 26 18:19:27 2015 +0200

    Minor misspelling and style fix.


>---------------------------------------------------------------

345645da0b62469de7dcbb79a50de3ed8ee987be
 src/mlpack/methods/ann/layer/base_layer.hpp |  6 ++++--
 src/mlpack/methods/ann/layer/bias_layer.hpp | 14 +++++++-------
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/src/mlpack/methods/ann/layer/base_layer.hpp b/src/mlpack/methods/ann/layer/base_layer.hpp
index 7a1448c..a4ad6ca 100644
--- a/src/mlpack/methods/ann/layer/base_layer.hpp
+++ b/src/mlpack/methods/ann/layer/base_layer.hpp
@@ -25,8 +25,10 @@ namespace ann /** Artificial Neural Network. */ {
  *  - IdentityLayer
  *
  * @tparam ActivationFunction Activation function used for the embedding layer.
- * @tparam DataType Type of data (arma::colvec, arma::mat arma::sp_mat or
- * arma::cube).
+ * @tparam InputDataType Type of the input data (arma::colvec, arma::mat,
+ *         arma::sp_mat or arma::cube).
+ * @tparam OutputDataType Type of the output data (arma::colvec, arma::mat,
+ *         arma::sp_mat or arma::cube).
  */
 template <
     class ActivationFunction = LogisticFunction,
diff --git a/src/mlpack/methods/ann/layer/bias_layer.hpp b/src/mlpack/methods/ann/layer/bias_layer.hpp
index 20ff71d..db91120 100644
--- a/src/mlpack/methods/ann/layer/bias_layer.hpp
+++ b/src/mlpack/methods/ann/layer/bias_layer.hpp
@@ -122,11 +122,11 @@ class BiasLayer
   /*
    * Calculate the gradient using the output delta and the bias.
    *
-   * @param g The calculated gradient.
    * @param d The calculated error.
+   * @param g The calculated gradient.
    */
-  template<typename GradientDataType, typename eT>
-  void Gradient(GradientDataType& g, arma::Cube<eT>& d)
+  template<typename eT, typename GradientDataType>
+  void Gradient(arma::Cube<eT>& d, GradientDataType& g)
   {
     g = arma::Mat<eT>(weights.n_rows, weights.n_cols);
     for (size_t s = 0; s < d.n_slices; s++)
@@ -138,11 +138,11 @@ class BiasLayer
   /*
    * Calculate the gradient using the output delta and the bias.
    *
-   * @param g The calculated gradient.
    * @param d The calculated error.
+   * @param g The calculated gradient.
    */
-  template<typename GradientDataType, typename eT>
-  void Gradient(GradientDataType& g, arma::Mat<eT>& d)
+  template<typename eT, typename GradientDataType>
+  void Gradient(arma::Mat<eT>& d, GradientDataType& g)
   {
     g = d * bias;
   }
@@ -202,7 +202,7 @@ class BiasLayer
   //! Locally-stored delta object.
   OutputDataType delta;
 
-  //! Locally-stored delta object.
+  //! Locally-stored gradient object.
   InputDataType gradient;
 
   //! Locally-stored input parameter object.



More information about the mlpack-git mailing list