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

Represents a serialized parameter block in a model definition. More...

#include <nvneural/CoreTypes.h>

Inheritance diagram for nvneural::IParameterNode:
nvneural::IRefObject

Public Member Functions

Getters
virtual NeuralResult getInteger (const char *pParameterName, std::int32_t *pIntOut) const noexcept=0
 Retrieves a signed integer value. More...
 
virtual NeuralResult getSize (const char *pParameterName, std::size_t *pSizeOut) const noexcept=0
 Retrieves an unsigned integer value that can represent the result of sizeof(). More...
 
virtual NeuralResult getFloat (const char *pParameterName, float *pFloatOut) const noexcept=0
 Retrieves a floating-point value. More...
 
virtual NeuralResult getString (const char *pParameterName, const char **pStringOut) const noexcept=0
 Retrieves a UTF-8 string value. More...
 
virtual NeuralResult getDimension (const char *pParameterName, TensorDimension *pDimOut) const noexcept=0
 Retrieves a tensor dimension. More...
 
Setters
virtual NeuralResult setInteger (const char *pParameterName, std::int32_t value) noexcept=0
 Saves an integer. More...
 
virtual NeuralResult setSize (const char *pParameterName, std::size_t value) noexcept=0
 Saves an unsigned integer that can represent the result of sizeof(). More...
 
virtual NeuralResult setFloat (const char *pParameterName, float value) noexcept=0
 Saves a floating-point value. More...
 
virtual NeuralResult setString (const char *pParameterName, const char *pString) noexcept=0
 Saves a UTF-8 string value. More...
 
virtual NeuralResult setDimension (const char *pParameterName, TensorDimension value) noexcept=0
 Saves a tensor dimension. 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 = 0x4f0ffb1d41d49fcul
 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

Represents a serialized parameter block in a model definition.

Layers should read their parameters from this object when deserializing a network.

Warning
Some backing stores may implement type checking, but this is not guaranteed.

Member Function Documentation

◆ getDimension()

virtual NeuralResult nvneural::IParameterNode::getDimension ( const char *  pParameterName,
TensorDimension pDimOut 
) const
pure virtualnoexcept

Retrieves a tensor dimension.

Tensor dimensions are stored as strings, and parsed using TensorDimensionToString as described in CoreHelpers.h. The IMAGE mode is used for parsing; use getString and parse manually if you require tensor ordering. Almost all persisted dimensions in existing networks are parsed using IMAGE mode; when porting Creo Neural code, this is probably what you need.

Parameters
pParameterNameName of parameter to query
pDimOutPointer to a variable receiving the parameter value

◆ getFloat()

virtual NeuralResult nvneural::IParameterNode::getFloat ( const char *  pParameterName,
float *  pFloatOut 
) const
pure virtualnoexcept

Retrieves a floating-point value.

Parameters
pParameterNameName of parameter to query
pFloatOutPointer to a variable receiving the parameter value.

◆ getInteger()

virtual NeuralResult nvneural::IParameterNode::getInteger ( const char *  pParameterName,
std::int32_t *  pIntOut 
) const
pure virtualnoexcept

Retrieves a signed integer value.

Parameters
pParameterNameName of parameter to query
pIntOutPointer to a variable receiving the parameter value.

◆ getSize()

virtual NeuralResult nvneural::IParameterNode::getSize ( const char *  pParameterName,
std::size_t *  pSizeOut 
) const
pure virtualnoexcept

Retrieves an unsigned integer value that can represent the result of sizeof().

Parameters
pParameterNameName of parameter to query
pSizeOutPointer to a variable receiving the parameter value.

◆ getString()

virtual NeuralResult nvneural::IParameterNode::getString ( const char *  pParameterName,
const char **  pStringOut 
) const
pure virtualnoexcept

Retrieves a UTF-8 string value.

Parameters
pParameterNameName of parameter to query
pStringOutPointer to a variable receiving the parameter value.

◆ setDimension()

virtual NeuralResult nvneural::IParameterNode::setDimension ( const char *  pParameterName,
TensorDimension  value 
)
pure virtualnoexcept

Saves a tensor dimension.

Parameters
pParameterNameName of parameter to set
valueValue to save

◆ setFloat()

virtual NeuralResult nvneural::IParameterNode::setFloat ( const char *  pParameterName,
float  value 
)
pure virtualnoexcept

Saves a floating-point value.

Parameters
pParameterNameName of parameter to set
valueValue to save

◆ setInteger()

virtual NeuralResult nvneural::IParameterNode::setInteger ( const char *  pParameterName,
std::int32_t  value 
)
pure virtualnoexcept

Saves an integer.

Parameters
pParameterNameName of parameter to set
valueValue to save

◆ setSize()

virtual NeuralResult nvneural::IParameterNode::setSize ( const char *  pParameterName,
std::size_t  value 
)
pure virtualnoexcept

Saves an unsigned integer that can represent the result of sizeof().

Parameters
pParameterNameName of parameter to set
valueValue to save

◆ setString()

virtual NeuralResult nvneural::IParameterNode::setString ( const char *  pParameterName,
const char *  pString 
)
pure virtualnoexcept

Saves a UTF-8 string value.

Parameters
pParameterNameName of parameter to set
pStringValue to save

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