@Namespace(value="dai") @NoOffset @Properties(inherit=depthai.class) public class NNData extends Buffer
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter| Constructor and Description |
|---|
NNData()
Construct NNData message.
|
NNData(long size)
Native array allocator.
|
NNData(Pointer p)
Pointer cast constructor.
|
NNData(RawNNData ptr) |
| Modifier and Type | Method and Description |
|---|---|
StringVector |
getAllLayerNames() |
TensorInfo |
getAllLayers() |
FloatPointer |
getFirstLayerFp16()
Convinience function to retrieve float values from first layers FP16 tensor
|
IntPointer |
getFirstLayerInt32()
Convinience function to retrieve INT32 values from first layers tensor
|
BytePointer |
getFirstLayerUInt8()
Convinience function to retrieve U8 data from first layer
|
boolean |
getLayer(BytePointer name,
TensorInfo tensor)
Retrieve layers tensor information
|
boolean |
getLayer(String name,
TensorInfo tensor) |
boolean |
getLayerDatatype(BytePointer name,
int[] datatype) |
boolean |
getLayerDatatype(BytePointer name,
IntBuffer datatype) |
boolean |
getLayerDatatype(BytePointer name,
IntPointer datatype)
Retrieve datatype of a layers tensor
|
boolean |
getLayerDatatype(String name,
int[] datatype) |
boolean |
getLayerDatatype(String name,
IntBuffer datatype) |
boolean |
getLayerDatatype(String name,
IntPointer datatype) |
FloatPointer |
getLayerFp16(BytePointer name)
Convinience function to retrieve float values from layers FP16 tensor
|
FloatBuffer |
getLayerFp16(String name) |
IntPointer |
getLayerInt32(BytePointer name)
Convinience function to retrieve INT32 values from layers tensor
|
IntBuffer |
getLayerInt32(String name) |
BytePointer |
getLayerUInt8(BytePointer name)
Convinience function to retrieve U8 data from layer
|
ByteBuffer |
getLayerUInt8(String name) |
NNData |
getPointer(long i) |
boolean |
hasLayer(BytePointer name)
Checks if given layer exists
|
boolean |
hasLayer(String name) |
NNData |
position(long position) |
void |
setLayer(BytePointer name,
byte[] data) |
void |
setLayer(BytePointer name,
ByteBuffer data) |
void |
setLayer(BytePointer name,
BytePointer data)
Set a layer with datatype U8.
|
void |
setLayer(BytePointer name,
double[] data) |
void |
setLayer(BytePointer name,
DoubleBuffer data) |
void |
setLayer(BytePointer name,
DoublePointer data)
Set a layer with datatype FP16.
|
void |
setLayer(BytePointer name,
float[] data) |
void |
setLayer(BytePointer name,
FloatBuffer data) |
void |
setLayer(BytePointer name,
FloatPointer data)
Set a layer with datatype FP16.
|
void |
setLayer(BytePointer name,
int[] data) |
void |
setLayer(BytePointer name,
IntBuffer data) |
void |
setLayer(BytePointer name,
IntPointer data)
Set a layer with datatype U8.
|
void |
setLayer(String name,
byte[] data) |
void |
setLayer(String name,
ByteBuffer data) |
void |
setLayer(String name,
BytePointer data) |
void |
setLayer(String name,
double[] data) |
void |
setLayer(String name,
DoubleBuffer data) |
void |
setLayer(String name,
DoublePointer data) |
void |
setLayer(String name,
float[] data) |
void |
setLayer(String name,
FloatBuffer data) |
void |
setLayer(String name,
FloatPointer data) |
void |
setLayer(String name,
int[] data) |
void |
setLayer(String name,
IntBuffer data) |
void |
setLayer(String name,
IntPointer data) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getPointer, getPointer, getPointer, hashCode, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zeropublic NNData(Pointer p)
Pointer(Pointer).public NNData(long size)
Pointer.position(long).public NNData()
public NNData(@SharedPtr RawNNData ptr)
public NNData getPointer(long i)
getPointer in class Bufferpublic void setLayer(@StdString BytePointer name, @Cast(value="std::uint8_t*") @StdVector BytePointer data)
name - Name of the layerdata - Data to storepublic void setLayer(@StdString String name, @Cast(value="std::uint8_t*") @StdVector ByteBuffer data)
public void setLayer(@StdString BytePointer name, @Cast(value="std::uint8_t*") @StdVector byte[] data)
public void setLayer(@StdString String name, @Cast(value="std::uint8_t*") @StdVector BytePointer data)
public void setLayer(@StdString BytePointer name, @Cast(value="std::uint8_t*") @StdVector ByteBuffer data)
public void setLayer(@StdString String name, @Cast(value="std::uint8_t*") @StdVector byte[] data)
public void setLayer(@StdString BytePointer name, @Const @StdVector @ByRef IntPointer data)
name - Name of the layerdata - Data to storepublic void setLayer(@StdString String name, @Const @StdVector @ByRef IntBuffer data)
public void setLayer(@StdString BytePointer name, @Const @StdVector @ByRef int[] data)
public void setLayer(@StdString String name, @Const @StdVector @ByRef IntPointer data)
public void setLayer(@StdString BytePointer name, @Const @StdVector @ByRef IntBuffer data)
public void setLayer(@StdString String name, @Const @StdVector @ByRef int[] data)
public void setLayer(@StdString BytePointer name, @StdVector FloatPointer data)
name - Name of the layerdata - Data to storepublic void setLayer(@StdString String name, @StdVector FloatBuffer data)
public void setLayer(@StdString BytePointer name, @StdVector float[] data)
public void setLayer(@StdString String name, @StdVector FloatPointer data)
public void setLayer(@StdString BytePointer name, @StdVector FloatBuffer data)
public void setLayer(@StdString String name, @StdVector float[] data)
public void setLayer(@StdString BytePointer name, @StdVector DoublePointer data)
name - Name of the layerdata - Data to storepublic void setLayer(@StdString String name, @StdVector DoubleBuffer data)
public void setLayer(@StdString BytePointer name, @StdVector double[] data)
public void setLayer(@StdString String name, @StdVector DoublePointer data)
public void setLayer(@StdString BytePointer name, @StdVector DoubleBuffer data)
public void setLayer(@StdString String name, @StdVector double[] data)
@ByVal public StringVector getAllLayerNames()
@StdVector public TensorInfo getAllLayers()
@Cast(value="bool") public boolean getLayer(@StdString BytePointer name, @ByRef TensorInfo tensor)
name - Name of the layertensor - [out] Outputs tensor infromation of that layer@Cast(value="bool") public boolean getLayer(@StdString String name, @ByRef TensorInfo tensor)
@Cast(value="bool") public boolean hasLayer(@StdString BytePointer name)
name - Name of the layer@Cast(value="bool") public boolean hasLayer(@StdString String name)
@Cast(value="bool") public boolean getLayerDatatype(@StdString BytePointer name, @ByRef @Cast(value="dai::TensorInfo::DataType*") IntPointer datatype)
name - Name of the layerdatatype - [out] Datatype of layers tensor@Cast(value="bool") public boolean getLayerDatatype(@StdString String name, @ByRef @Cast(value="dai::TensorInfo::DataType*") IntBuffer datatype)
@Cast(value="bool") public boolean getLayerDatatype(@StdString BytePointer name, @ByRef @Cast(value="dai::TensorInfo::DataType*") int[] datatype)
@Cast(value="bool") public boolean getLayerDatatype(@StdString String name, @ByRef @Cast(value="dai::TensorInfo::DataType*") IntPointer datatype)
@Cast(value="bool") public boolean getLayerDatatype(@StdString BytePointer name, @ByRef @Cast(value="dai::TensorInfo::DataType*") IntBuffer datatype)
@Cast(value="bool") public boolean getLayerDatatype(@StdString String name, @ByRef @Cast(value="dai::TensorInfo::DataType*") int[] datatype)
@Cast(value="std::uint8_t*") @StdVector public BytePointer getLayerUInt8(@StdString BytePointer name)
name - Name of the layer@Cast(value="std::uint8_t*") @StdVector public ByteBuffer getLayerUInt8(@StdString String name)
@StdVector public FloatPointer getLayerFp16(@StdString BytePointer name)
name - Name of the layer@StdVector public FloatBuffer getLayerFp16(@StdString String name)
@Cast(value="std::int32_t*") @StdVector public IntPointer getLayerInt32(@StdString BytePointer name)
name - Name of the layer@Cast(value="std::int32_t*") @StdVector public IntBuffer getLayerInt32(@StdString String name)
@Cast(value="std::uint8_t*") @StdVector public BytePointer getFirstLayerUInt8()
@StdVector public FloatPointer getFirstLayerFp16()
@Cast(value="std::int32_t*") @StdVector public IntPointer getFirstLayerInt32()
Copyright © 2021. All rights reserved.