CHORE: Add tests for Leaky MetaOperator
Context
The goal of this PR is to add tests for the Leaky SNN Metaoperator.
As a metaoperator, it was dependent on the implementations of the operators it is made of. With the merge of Heaviside
in dev
, we can now add tests.
Modified files
-
unit_tests/operator/Test_MetaOperator.cpp
: add tests forLeaky
operator.
Detailed major modifications
Add two tests sections to Test_MetaOperator
:
- Leaky(forward)(fixed) : Test the leaky operator by comparing it to values previously computed using snntorch.
- Leaky(forward) : Test the leaky operator with random values (note that hyperparameters like beta are still fixed), comparing it to an ad-hoc implementation of the leaky operation.