@Namespace(value="nvinfer1") @NoOffset @Properties(inherit=nvinfer.class) public class ILayer extends INoCopy
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
ILayer(Pointer p)
Pointer cast constructor.
|
Modifier and Type | Method and Description |
---|---|
ITensor |
getInput(int index)
\brief Get the layer input corresponding to the given index.
|
String |
getMetadata()
\brief Get the metadata of the layer.
|
String |
getName()
\brief Return the name of a layer.
|
int |
getNbInputs()
\brief Get the number of inputs of a layer.
|
int |
getNbOutputs()
\brief Get the number of outputs of a layer.
|
ITensor |
getOutput(int index)
\brief Get the layer output corresponding to the given index.
|
nvinfer.DataType |
getOutputType(int index)
\brief get the output type of this layer
|
nvinfer.DataType |
getPrecision()
\brief get the computational precision of this layer
|
nvinfer.LayerType |
getType()
\brief Return the type of a layer.
|
boolean |
outputTypeIsSet(int index)
\brief whether the output type has been set for this layer
|
boolean |
precisionIsSet()
\brief whether the computational precision has been set for this layer
|
void |
resetOutputType(int index)
\brief reset the output type for this layer
|
void |
resetPrecision()
\brief reset the computational precision for this layer
|
void |
setInput(int index,
ITensor tensor)
\brief Replace an input of this layer with a specific tensor.
|
void |
setMetadata(BytePointer metadata) |
void |
setMetadata(String metadata)
\brief Set the metadata for this layer.
|
void |
setName(BytePointer name) |
void |
setName(String name)
\brief Set the name of a layer.
|
void |
setOutputType(int index,
int dataType) |
void |
setOutputType(int index,
nvinfer.DataType dataType)
\brief Set the output type of this layer in a weakly-typed network.
|
void |
setPrecision(int dataType) |
void |
setPrecision(nvinfer.DataType dataType)
\brief Set the preferred or required computational precision of this layer in a weakly-typed network.
|
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public ILayer(Pointer p)
Pointer(Pointer)
.@NoException(value=true) public nvinfer.LayerType getType()
nvinfer.LayerType
@NoException(value=true) public void setName(String name)
getName()
@NoException(value=true) public void setName(@Cast(value="const char*") BytePointer name)
@NoException(value=true) public String getName()
setName()
@NoException(value=true) public int getNbInputs()
@NoException(value=true) public ITensor getInput(int index)
index
- The index of the input tensor.@NoException(value=true) public int getNbOutputs()
@NoException(value=true) public ITensor getOutput(int index)
@NoException(value=true) public void setInput(int index, @ByRef ITensor tensor)
index
- the index of the input to modify.tensor
- the new input tensor
Except for IFillLayer, ILoopOutputLayer, INMSLayer, IResizeLayer, IShuffleLayer, and ISliceLayer,
this method cannot change the number of inputs to a layer. The index argument must be
less than the value of getNbInputs().
See comments for overloads of setInput() for layers with special behavior.@NoException(value=true) public void setPrecision(nvinfer.DataType dataType)
dataType
- the computational precision.precisionIsSet() resetPrecision()
@NoException(value=true) public void setPrecision(@Cast(value="nvinfer1::DataType") int dataType)
@NoException(value=true) public nvinfer.DataType getPrecision()
precisionIsSet() resetPrecision()
@Cast(value="bool") @NoException(value=true) public boolean precisionIsSet()
getPrecision() resetPrecision()
@NoException(value=true) public void resetPrecision()
getPrecision() precisionIsSet()
@NoException(value=true) public void setOutputType(int index, nvinfer.DataType dataType)
index
- the index of the output to setdataType
- the type of the outputoutputTypeIsSet() resetOutputType()
@NoException(value=true) public void setOutputType(int index, @Cast(value="nvinfer1::DataType") int dataType)
@NoException(value=true) public nvinfer.DataType getOutputType(int index)
index
- the index of the outputoutputTypeIsSet() resetOutputType()
@Cast(value="bool") @NoException(value=true) public boolean outputTypeIsSet(int index)
index
- the index of the outputgetOutputType() resetOutputType()
@NoException(value=true) public void resetOutputType(int index)
index
- the index of the outputgetOutputType() outputTypeIsSet()
@NoException(value=true) public void setMetadata(String metadata)
metadata
- The per-layer metadata.
\warning The string name must be null-terminated and be at most 4096 bytes including the terminator.getMetadata()
,
getLayerInformation()
@NoException(value=true) public void setMetadata(@Cast(value="const char*") BytePointer metadata)
@NoException(value=true) public String getMetadata()
setMetadata()
Copyright © 2024. All rights reserved.