SNABSuite  0.x
Spiking Neural Architecture Benchmark Suite
Public Member Functions | List of all members
MNIST::PositiveWeights Class Reference

Constraint for weights in neural network: Only weights >0. More...

#include <mnist_mlp.hpp>

Public Member Functions

void setup (std::vector< cypress::Matrix< Real >> &)
 
void constrain_weights (std::vector< cypress::Matrix< Real >> &layers)
 

Detailed Description

Constraint for weights in neural network: Only weights >0.

Definition at line 148 of file mnist_mlp.hpp.

Member Function Documentation

void MNIST::PositiveWeights::constrain_weights ( std::vector< cypress::Matrix< Real >> &  layers)
inline

Definition at line 151 of file mnist_mlp.hpp.

152  {
153  for (auto &i : layers) {
154  for (auto &j : i) {
155  if (j < 0.0) {
156  j = 0.0;
157  }
158  }
159  }
160  }
void MNIST::PositiveWeights::setup ( std::vector< cypress::Matrix< Real >> &  )
inline

Definition at line 150 of file mnist_mlp.hpp.

150 {}

The documentation for this class was generated from the following file: