[mlpack-git] master: Add method to get the number of slices. (5b5e1cf)

gitdub at big.cc.gt.atl.ga.us gitdub at big.cc.gt.atl.ga.us
Mon May 4 15:14:55 EDT 2015


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

On branch  : master
Link       : https://github.com/mlpack/mlpack/compare/6caf31a493719a3a5edf2fdcde9b0eef9e165944...6137e52d32c1338b28853afd059b67cf68a50270

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

commit 5b5e1cf5b91fb49b7ae3a0627e47a7af476d3454
Author: Marcus Edel <marcus.edel at fu-berlin.de>
Date:   Mon May 4 20:02:27 2015 +0200

    Add method to get the number of slices.


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

5b5e1cf5b91fb49b7ae3a0627e47a7af476d3454
 src/mlpack/methods/ann/layer/bias_layer.hpp    | 3 +++
 src/mlpack/methods/ann/layer/lstm_layer.hpp    | 3 +++
 src/mlpack/methods/ann/layer/softmax_layer.hpp | 3 +++
 3 files changed, 9 insertions(+)

diff --git a/src/mlpack/methods/ann/layer/bias_layer.hpp b/src/mlpack/methods/ann/layer/bias_layer.hpp
index d982b65..90da231 100644
--- a/src/mlpack/methods/ann/layer/bias_layer.hpp
+++ b/src/mlpack/methods/ann/layer/bias_layer.hpp
@@ -98,6 +98,9 @@ class BiasLayer
   //! Modify the output size.
   size_t& OutputSize() { return layerSize; }
 
+  //! Get the number of layer slices.
+  size_t LayerSlices() const { return 1; }
+
  private:
   //! Locally-stored input activation object.
   VecType inputActivations;
diff --git a/src/mlpack/methods/ann/layer/lstm_layer.hpp b/src/mlpack/methods/ann/layer/lstm_layer.hpp
index 7ec9300..882d781 100644
--- a/src/mlpack/methods/ann/layer/lstm_layer.hpp
+++ b/src/mlpack/methods/ann/layer/lstm_layer.hpp
@@ -314,6 +314,9 @@ class LSTMLayer
   //! Modify the output size.
   size_t& OutputSize() { return layerSize; }
 
+  //! Get the number of layer slices.
+  size_t LayerSlices() const { return 1; }
+
   //! Get the detla.
   VecType& Delta() const { return delta; }
  //  //! Modify the delta.
diff --git a/src/mlpack/methods/ann/layer/softmax_layer.hpp b/src/mlpack/methods/ann/layer/softmax_layer.hpp
index 1583035..7d0672d 100644
--- a/src/mlpack/methods/ann/layer/softmax_layer.hpp
+++ b/src/mlpack/methods/ann/layer/softmax_layer.hpp
@@ -88,6 +88,9 @@ class SoftmaxLayer
   //! Modify the output size.
   size_t& OutputSize() { return layerSize; }
 
+    //! Get the number of layer slices.
+  size_t LayerSlices() const { return 1; }
+
  private:
   //! Locally-stored input activation object.
   VecType inputActivations;



More information about the mlpack-git mailing list