Package ai.djl.nn
Class AbstractSymbolBlock
java.lang.Object
ai.djl.nn.AbstractBaseBlock
ai.djl.nn.AbstractSymbolBlock
- All Implemented Interfaces:
Block
,SymbolBlock
AbstractSymbolBlock
is an abstract implementation of SymbolBlock
.-
Field Summary
Fields inherited from class ai.djl.nn.AbstractBaseBlock
inputNames, inputShapes, outputDataTypes, version
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a newAbstractSymbolBlock
instance.AbstractSymbolBlock
(byte version) Builds an empty block with the given version for parameter serialization. -
Method Summary
Modifier and TypeMethodDescriptionReturns a list of all the children of the block.Shape[]
getOutputShapes
(Shape[] inputShapes) Returns the expected output shapes of the block for the specified input shapes.Methods inherited from class ai.djl.nn.AbstractBaseBlock
beforeInitialize, cast, clear, describeInput, forward, forward, forwardInternal, forwardInternal, getInputShapes, getOutputDataTypes, getParameters, initialize, initializeChildBlocks, isInitialized, loadMetadata, loadParameters, prepare, readInputShapes, saveInputShapes, saveMetadata, saveParameters, setInitializer, setInitializer, setInitializer, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface ai.djl.nn.Block
cast, clear, describeInput, forward, forward, forward, freezeParameters, freezeParameters, getDirectParameters, getInputShapes, getOutputDataTypes, getOutputShapes, getParameters, initialize, isInitialized, loadParameters, saveParameters, setInitializer, setInitializer, setInitializer
Methods inherited from interface ai.djl.nn.SymbolBlock
describeOutput, removeLastBlock
-
Constructor Details
-
AbstractSymbolBlock
public AbstractSymbolBlock()Constructs a newAbstractSymbolBlock
instance. -
AbstractSymbolBlock
public AbstractSymbolBlock(byte version) Builds an empty block with the given version for parameter serialization.- Parameters:
version
- the version to use for parameter serialization.
-
-
Method Details
-
getOutputShapes
Returns the expected output shapes of the block for the specified input shapes.- Specified by:
getOutputShapes
in interfaceBlock
- Parameters:
inputShapes
- the shapes of the inputs- Returns:
- the expected output shapes of the block
-
getChildren
Returns a list of all the children of the block.- Specified by:
getChildren
in interfaceBlock
- Returns:
- the list of child blocks
-