Minor style fix; Add some spaces.

This commit is contained in:
marcus
2016-02-24 20:47:42 +01:00
parent 2aedd27420
commit dc368011ee
10 changed files with 39 additions and 54 deletions
+4 -18
View File
@@ -46,20 +46,6 @@ class BiasLayer
{
weights.set_size(outSize, 1);
}
BiasLayer(BiasLayer &&layer) noexcept
{
*this = std::move(layer);
}
BiasLayer& operator=(BiasLayer &&layer) noexcept
{
outSize = layer.outSize;
bias = layer.bias;
weights.swap(layer.weights);
return *this;
}
/**
* Ordinary feed forward pass of a neural network, evaluating the function
@@ -142,22 +128,22 @@ class BiasLayer
InputDataType& Weights() { return weights; }
//! Get the input parameter.
InputDataType& InputParameter() const {return inputParameter; }
InputDataType& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
OutputDataType& OutputParameter() const {return outputParameter; }
OutputDataType& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType& Delta() const {return delta; }
OutputDataType& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
//! Get the gradient.
InputDataType& Gradient() const {return gradient; }
InputDataType& Gradient() const { return gradient; }
//! Modify the gradient.
InputDataType& Gradient() { return gradient; }
+4 -4
View File
@@ -185,22 +185,22 @@ class ConvLayer
OutputDataType& Weights() { return weights; }
//! Get the input parameter.
InputDataType& InputParameter() const {return inputParameter; }
InputDataType& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
OutputDataType& OutputParameter() const {return outputParameter; }
OutputDataType& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType& Delta() const {return delta; }
OutputDataType& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
//! Get the gradient.
OutputDataType& Gradient() const {return gradient; }
OutputDataType& Gradient() const { return gradient; }
//! Modify the gradient.
OutputDataType& Gradient() { return gradient; }
@@ -36,8 +36,7 @@ class LinearLayer
* @param inSize The number of input units.
* @param outSize The number of output units.
*/
LinearLayer(const size_t inSize,
const size_t outSize) :
LinearLayer(const size_t inSize, const size_t outSize) :
inSize(inSize),
outSize(outSize)
{
@@ -131,22 +130,22 @@ class LinearLayer
OutputDataType& Weights() { return weights; }
//! Get the input parameter.
InputDataType& InputParameter() const {return inputParameter; }
InputDataType& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
OutputDataType& OutputParameter() const {return outputParameter; }
OutputDataType& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType& Delta() const {return delta; }
OutputDataType& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
//! Get the gradient.
OutputDataType& Gradient() const {return gradient; }
OutputDataType& Gradient() const { return gradient; }
//! Modify the gradient.
OutputDataType& Gradient() { return gradient; }
+3 -3
View File
@@ -268,17 +268,17 @@ class LSTMLayer
OutputDataType& Weights() { return peepholeWeights; }
//! Get the input parameter.
InputDataType& InputParameter() const {return inputParameter; }
InputDataType& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
OutputDataType& OutputParameter() const {return outputParameter; }
OutputDataType& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType& Delta() const {return delta; }
OutputDataType& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
@@ -149,17 +149,17 @@ class PoolingLayer
}
//! Get the input parameter.
InputDataType& InputParameter() const {return inputParameter; }
InputDataType& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
InputDataType& OutputParameter() const {return outputParameter; }
InputDataType& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
InputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType& Delta() const {return delta; }
OutputDataType& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
@@ -119,27 +119,27 @@ class RecurrentLayer
OutputDataType& Weights() { return weights; }
//! Get the input parameter.
InputDataType& InputParameter() const {return inputParameter; }
InputDataType& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the input parameter.
InputDataType& RecurrentParameter() const {return recurrentParameter; }
InputDataType& RecurrentParameter() const { return recurrentParameter; }
//! Modify the input parameter.
InputDataType& RecurrentParameter() { return recurrentParameter; }
//! Get the output parameter.
OutputDataType& OutputParameter() const {return outputParameter; }
OutputDataType& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType& Delta() const {return delta; }
OutputDataType& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
//! Get the gradient.
OutputDataType& Gradient() const {return gradient; }
OutputDataType& Gradient() const { return gradient; }
//! Modify the gradient.
OutputDataType& Gradient() { return gradient; }
@@ -83,17 +83,17 @@ class SoftmaxLayer
}
//! Get the input parameter.
InputDataType& InputParameter() const {return inputParameter; }
InputDataType& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
OutputDataType& OutputParameter() const {return outputParameter; }
OutputDataType& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
InputDataType& Delta() const {return delta; }
InputDataType& Delta() const { return delta; }
//! Modify the delta.
InputDataType& Delta() { return delta; }
@@ -112,22 +112,22 @@ class SparseBiasLayer
InputDataType& Weights() { return weights; }
//! Get the input parameter.
InputDataType const& InputParameter() const {return inputParameter; }
InputDataType const& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
OutputDataType const& OutputParameter() const {return outputParameter; }
OutputDataType const& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType const& Delta() const {return delta; }
OutputDataType const& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
//! Get the gradient.
InputDataType const& Gradient() const {return gradient; }
InputDataType const& Gradient() const { return gradient; }
//! Modify the gradient.
InputDataType& Gradient() { return gradient; }
@@ -114,22 +114,22 @@ class SparseInputLayer
OutputDataType& Weights() { return weights; }
//! Get the input parameter.
InputDataType const& InputParameter() const {return inputParameter; }
InputDataType const& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
OutputDataType const& OutputParameter() const {return outputParameter; }
OutputDataType const& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType const& Delta() const {return delta; }
OutputDataType const& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
//! Get the gradient.
OutputDataType& Gradient() const {return gradient; }
OutputDataType& Gradient() const { return gradient; }
//! Modify the gradient.
OutputDataType& Gradient() { return gradient; }
@@ -154,22 +154,22 @@ class SparseOutputLayer
OutputDataType& RhoCap() { return rhoCap; }
//! Get the input parameter.
InputDataType const& InputParameter() const {return inputParameter; }
InputDataType const& InputParameter() const { return inputParameter; }
//! Modify the input parameter.
InputDataType& InputParameter() { return inputParameter; }
//! Get the output parameter.
OutputDataType const& OutputParameter() const {return outputParameter; }
OutputDataType const& OutputParameter() const { return outputParameter; }
//! Modify the output parameter.
OutputDataType& OutputParameter() { return outputParameter; }
//! Get the delta.
OutputDataType const& Delta() const {return delta; }
OutputDataType const& Delta() const { return delta; }
//! Modify the delta.
OutputDataType& Delta() { return delta; }
//! Get the gradient.
OutputDataType const& Gradient() const {return gradient; }
OutputDataType const& Gradient() const { return gradient; }
//! Modify the gradient.
OutputDataType& Gradient() { return gradient; }