NVIDIA NvNeural SDK  2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
nvneural::INetworkLayer Class Referenceabstract

INetworkLayer objects are ILayers that encapsulate an externally defined network graph. More...

#include <NetworkLayer.h>

Inheritance diagram for nvneural::INetworkLayer:
nvneural::IRefObject

Public Member Functions

virtual NeuralResult addFusingRuleToSubNetwork (const char *pFusingRule) noexcept=0
 Adds a v2 fusing rule to the subgraph's network builder object. More...
 
virtual NeuralResult getFlattenSubNetworkLayerList (ILayerList **ppLayerList, size_t *pDepth) const noexcept=0
 Returns a recursively flattened list of layers contained in the subgraph. More...
 
virtual NeuralResult getOutputs (ILayerList **ppLayerList) const noexcept=0
 Returns a list of output layers defined in the subgraph. More...
 
- Public Member Functions inherited from nvneural::IRefObject
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 = 0x90a0da9f3d52f363ul
 Interface TypeId for InterfaceOf purposes.
 
- Static Public Attributes inherited from nvneural::IRefObject
static const TypeId typeID = 0x14ecc3f9de638e1dul
 Interface TypeId for InterfaceOf purposes.
 

Additional Inherited Members

- Public Types inherited from nvneural::IRefObject
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.
 
- Protected Member Functions inherited from nvneural::IRefObject
virtual ~IRefObject ()=default
 A protected destructor prevents accidental stack-allocation of IRefObjects or use with other smart pointer classes like std::unique_ptr.
 

Detailed Description

INetworkLayer objects are ILayers that encapsulate an externally defined network graph.

They do not actually contain an INetworkRuntime, but instead proxy their reshape/evaluate/etc. operations into an internally tracked list of ILayer objects.

Member Function Documentation

◆ addFusingRuleToSubNetwork()

virtual NeuralResult nvneural::INetworkLayer::addFusingRuleToSubNetwork ( const char *  pFusingRule)
pure virtualnoexcept

Adds a v2 fusing rule to the subgraph's network builder object.

Must be called before calling ILayer::loadFromParameters.

Parameters
pFusingRuleFusing rule definition using v2 syntax
See also
nvneural::FusingRule

◆ getFlattenSubNetworkLayerList()

virtual NeuralResult nvneural::INetworkLayer::getFlattenSubNetworkLayerList ( ILayerList **  ppLayerList,
size_t *  pDepth 
) const
pure virtualnoexcept

Returns a recursively flattened list of layers contained in the subgraph.

Input connection layers are internally aliases to external layers and as such are not represented in the returned list. Any network layers that are part of the subgraph are themselves flattened and included in the list.

Parameters
ppLayerListPointer to a variable receiving a list of contained layers
pDepthPointer to a variable receiving the maximum subgraph depth

◆ getOutputs()

virtual NeuralResult nvneural::INetworkLayer::getOutputs ( ILayerList **  ppLayerList) const
pure virtualnoexcept

Returns a list of output layers defined in the subgraph.

Parameters
ppLayerListPointer to a variable receiving a list of subgraph output layers
See also
INetworkRuntime::getOutputLayers

The documentation for this class was generated from the following file: