NVIDIA NvNeural SDK
2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
|
IActivationFunction represents a functor that can perform a specific activation function. More...
#include <nvneural/CoreTypes.h>
Public Member Functions | |
virtual NeuralResult | invoke (ILayer *pLayer) noexcept=0 |
Performs activation for a layer. | |
virtual const char * | serializedType () const noexcept=0 |
Retrieves the type of the activation function. More... | |
virtual NeuralResult | setNetworkRuntime (INetworkRuntime *pNetwork) noexcept=0 |
Sets the owning network runtime. Will be called before any call to invoke. | |
![]() | |
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 = 0x66e36120ed8745d8ul |
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. | |
IActivationFunction represents a functor that can perform a specific activation function.
Networks instantiate these in order to provide generic activation support (through INetworkRuntime::defaultForwardActivation) when layers do not fuse their own built- in activation functions.
Layers should fuse their own activation functions where possible, as launching a separate CUDA kernel with accompanying memory accesses to every tensor element is inherently a lower-performing alternative to applying the activation as part of the main layer kernel.
|
pure virtualnoexcept |
Retrieves the type of the activation function.
Should match the associated ActivationDesc::pSerializedName field.
Returned value must be non-null and valid throughout the lifespan of the object.