Currently, the Kaspersky Neuromorphic Platform supports the property sets and projection typification based on the synapse models DeltaSynapse
, AdditiveSTDPDeltaSynapse
, and SynapticResourceSTDPDeltaSynapse
. If required, you can add a new synapse type.
You can use this instruction when working with the platform source code.
To add a new synapse type:
synapse-traits-library/include/knp/synapse-traits/
, and create a header file for the new synapse type. default_values
, synapse_parameters
).An example of a delta synapse definition:
synapse-traits-library/include/knp/synapse-traits/delta.h
#include "type_traits.h"
namespace knp::synapse_traits
{
struct DeltaSynapse;
template <>
struct default_values<DeltaSynapse>
{
// Specifies the default synapse weight.
constexpr static float weight_ = 0.0F;
// Specifies the default synapse delay.
constexpr static uint32_t delay_ = 1;
// Specifies the default synapse type.
constexpr static OutputType output_type_ = OutputType::EXCITATORY;
};
template <>
struct synapse_parameters<DeltaSynapse>
{
// Specifies the synapse attributes.
synapse_parameters() : weight_(0.0F), delay_(1), output_type_(knp::synapse_traits::OutputType::EXCITATORY) {}
synapse_parameters(float weight, uint32_t delay, knp::synapse_traits::OutputType type)
: weight_(weight), delay_(delay), output_type_(type)
// Synapse weight.
float weight_;
// Synapse delay.
std::size_t delay_;
// Output synapse type.
knp::synapse_traits::OutputType output_type_;
};
} // namespace knp::synapse_traits
synapse-traits-library/include/knp/synapse-traits/all_traits.h
header file.An example of adding a delta synapse to the list of synapses:
synapse-traits-library/include/knp/synapse-traits/all_traits.h
#include "delta.h"
namespace knp::synapse_traits
{
// A comma-separated list of synapse types.
#define ALL_SYNAPSES DeltaSynapse
// ...
} // namespace knp::neuron_traits
For example, for the CPU backend, implement the overloading method for starting the calculation of projections.