NVIDIA NvNeural SDK
2022.2
GPU inference framework for NVIDIA Nsight Deep Learning Designer
|
Official "public" interface allowing control of FilesystemWeightsLoader from other modules. More...
#include <FilesystemWeightsLoader.h>
Public Member Functions | |
Allow random weights as fallback | |
When filesystem loading fails, return randomly generated weight data instead. This is obviously undesirable for most inference cases, but can be useful for profiling use, where final results are unneeded and random weights might give "general" performance profiles instead of situation-specific optimization paths. By default, random generation is ON for compatibility with previous Neural code. | |
virtual NeuralResult | setAllowRandomWeights (bool allowRandoms) noexcept=0 |
Turn random weights generation on or off. | |
virtual bool | allowRandomWeights () const noexcept=0 |
Returns true if random weights generation is enabled. | |
Allow weights to be loaded as NumPy (.npy) files | |
By default, NumPy support is ON. | |
virtual NeuralResult | setAllowNumpyWeights (bool allowNumpy) noexcept=0 |
Turn NumPy support on or off. | |
virtual bool | allowNumpyWeights () const noexcept=0 |
Returns true if NumPy support is enabled. | |
Allow weights to be loaded as raw binary data (.bin) files | |
This is a simple memory-dump-like file format that is a contiguous array of 32-bit floating point values. The dimension of such weights is taken either from the ILayer::weightsDimensions() query with WeightsQuery::Required (if the layer returns a nonzero dimension) or as 1 x C x 1 x 1, where C is the number of floating-point elements read. By default, binary support is ON. | |
virtual NeuralResult | setAllowBinaryWeights (bool allowBinary) noexcept=0 |
Turn binary support on or off. | |
virtual bool | allowBinaryWeights () const noexcept=0 |
Returns true if binary support is enabled. | |
![]() | |
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 = 0x21f4e2b9c7038e85ul |
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. | |
Official "public" interface allowing control of FilesystemWeightsLoader from other modules.