Deep Neuronal Filter https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0277974.
More...
#include <dnf_torch.h>
|
| enum | ActMethod { Act_Sigmoid = 1
, Act_Tanh = 2
, Act_ReLU = 3
, Act_NONE = 0
} |
| | Options for activation functions of all neurons in the network.
|
| |
|
| | DNF (const int nLayers, const int nTaps, const ActMethod am=Act_Tanh, const bool tryGPU=false) |
| | Constructor which sets up the delay lines, network layers and also calculates the number of neurons per layer so that the final layer always just has one neuron.
|
| |
| void | setLearningRate (float mu) |
| | Sets the learning rate of the entire network.
|
| |
| float | filter (const float signal, const float noise) |
| | Realtime sample by sample filtering operation.
|
| |
| int | getSignalDelaySteps () const |
| | Returns the length of the delay line which delays the signal polluted with noise.
|
| |
| float | getDelayedSignal () const |
| | Returns the delayed with noise polluted signal by the delay indicated by getSignalDelaySteps().
|
| |
| float | getRemover () const |
| | Returns the remover signal.
|
| |
| float | getOutput () const |
| | Returns the output of the DNF: the noise free signal.
|
| |
| const std::vector< float > | getLayerWeightDistances () const |
| | Gets the weight distances per layer.
|
| |
| float | getWeightDistance () const |
| | Gets the overall weight distsance.
|
| |
|
const torch::Device | getTorchDevice () const |
| | Gets the torch device for example to determine if the GPU is being used.
|
| |
|
const Net | getModel () const |
| | Gets the torch model, for example, to read out the weights.
|
| |
|
|
static constexpr double | xavierGain = 0.01 |
| | Xavier gain for the weight init.
|
| |
◆ DNF()
| DNF::DNF |
( |
const int |
nLayers, |
|
|
const int |
nTaps, |
|
|
const ActMethod |
am = Act_Tanh, |
|
|
const bool |
tryGPU = false |
|
) |
| |
Constructor which sets up the delay lines, network layers and also calculates the number of neurons per layer so that the final layer always just has one neuron.
- Parameters
-
| nLayers | Number of layers |
| nTaps | Number of taps for the delay line feeding into the 1st layer |
| am | The activation function for the neurons. Default is tanh. |
| tryGPU | Does the learning on the GPU if available. |
◆ filter()
| float DNF::filter |
( |
const float |
signal, |
|
|
const float |
noise |
|
) |
| |
Realtime sample by sample filtering operation.
- Parameters
-
| signal | The signal contaminated with noise. Should be less than one. |
| noise | The reference noise. Should be less than one. |
- Returns
- The filtered signal where the noise has been removed by the DNF.
◆ getDelayedSignal()
| float DNF::getDelayedSignal |
( |
| ) |
const |
|
inline |
Returns the delayed with noise polluted signal by the delay indicated by getSignalDelaySteps().
- Returns
- The delayed noise polluted signal sample.
◆ getLayerWeightDistances()
| const std::vector< float > DNF::getLayerWeightDistances |
( |
| ) |
const |
Gets the weight distances per layer.
- Returns
- The Eucledian weight distance in relation to the initial weights.
◆ getOutput()
| float DNF::getOutput |
( |
| ) |
const |
|
inline |
Returns the output of the DNF: the noise free signal.
- Returns
- The current output of the DNF which is idential to filter().
◆ getRemover()
| float DNF::getRemover |
( |
| ) |
const |
|
inline |
Returns the remover signal.
- Returns
- The current remover signal sample.
◆ getSignalDelaySteps()
| int DNF::getSignalDelaySteps |
( |
| ) |
const |
|
inline |
Returns the length of the delay line which delays the signal polluted with noise.
- Returns
- Number of delay steps in samples.
◆ getWeightDistance()
| float DNF::getWeightDistance |
( |
| ) |
const |
Gets the overall weight distsance.
- Returns
- The sum of all layer weight distances.
◆ setLearningRate()
| void DNF::setLearningRate |
( |
float |
mu | ) |
|
Sets the learning rate of the entire network.
It can be set any time during learning. Setting it to zero disables learning / adaptation.
- Parameters
-
The documentation for this class was generated from the following file: