NVIDIA NvNeural SDK
2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
|
IInnerActivationLayer is an optional interface implemented by layers that fuse pairs of operations. More...
#include <nvneural/LayerTypes.h>
Public Member Functions | |
virtual float | innerActivationCoefficient (std::size_t coefficientIndex) const noexcept=0 |
Retrieves the activation coefficient for the specified index. More... | |
virtual ActivationFunctionId | innerActivationFunction () const noexcept=0 |
Retrieves the activation function attached to this layer. More... | |
virtual NeuralResult | setInnerActivationCoefficient (std::size_t coefficientIndex, float value) noexcept=0 |
Sets an inner activation coefficient. More... | |
virtual NeuralResult | setInnerActivationFunction (ActivationFunctionId activationFunction) noexcept=0 |
Sets the inner activation function. More... | |
![]() | |
virtual RefCount | addRef () const noexcept=0 |
Increments the object's reference count. More... | |
virtual const void * | queryInterface (TypeId interface) const noexcept=0 |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
virtual void * | queryInterface (TypeId interface) noexcept=0 |
Retrieves a new object interface pointer. More... | |
virtual RefCount | release () const noexcept=0 |
Decrements the object's reference count and destroy the object if the reference count reaches zero. More... | |
Static Public Attributes | |
static const IRefObject::TypeId | typeID = 0xff90b9f223475f88ul |
Interface TypeId for InterfaceOf purposes. | |
![]() | |
static const TypeId | typeID = 0x14ecc3f9de638e1dul |
Interface TypeId for InterfaceOf purposes. | |
Additional Inherited Members | |
![]() | |
using | RefCount = std::uint32_t |
Typedef used to track the number of active references to an object. | |
using | TypeId = std::uint64_t |
Every interface must define a unique TypeId. This should be randomized. | |
![]() | |
virtual | ~IRefObject ()=default |
A protected destructor prevents accidental stack-allocation of IRefObjects or use with other smart pointer classes like std::unique_ptr. | |
IInnerActivationLayer is an optional interface implemented by layers that fuse pairs of operations.
Model fusing rules can convert layer_A, layer_B pairs to a single layer_AB. All parameters of the source layers, including those related to activation functions, are forwarded to the fused layer; this interface provides access to the inner activation function without requiring arbitrary support for nested activations in the standard layer interfaces.
Nested activation parameters are also passed inside loadFromParameters as the _1_act and _1_act_alpha parameter names. The former is a string that should match an IClassRegistry-accessible ActivationDesc function ID. The latter is a comma-separated list of floating-point values.
|
pure virtualnoexcept |
Retrieves the activation coefficient for the specified index.
The meaning of this value is activation-specific. If no setActivationCoefficient call was previously issued for this index, the layer should return a default value of zero.
coefficientIndex | Coefficient index |
|
pure virtualnoexcept |
Retrieves the activation function attached to this layer.
Should return the most recent value passed to setInnerActivationFunction.
|
pure virtualnoexcept |
Sets an inner activation coefficient.
The meaning of this value is activation-specific.
coefficientIndex | Coefficient index |
value | Value to store |
|
pure virtualnoexcept |
Sets the inner activation function.
activationFunction | Function to assign. |