public class Symbol extends NativeResource
Symbol is an internal helper for symbolic model graphs used by the SymbolBlock.SymbolBlock,
MXNet
Symbolhandle| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Symbol |
copy()
Copies the symbol.
|
Symbol |
get(int index)
Returns the output symbol by index.
|
Symbol |
get(java.lang.String name)
Returns the output symbol with the given name.
|
java.lang.String[] |
getAllNames()
Returns the symbol names.
|
java.lang.String[] |
getArgNames()
Returns the symbol argument names.
|
java.lang.String[] |
getAuxNames()
Returns the MXNet auxiliary states for the symbol.
|
Symbol |
getInternals()
Returns the symbol internals.
|
java.util.List<java.lang.String> |
getLayerNames()
Returns the list of names for all internal outputs.
|
java.lang.String[] |
getOutputNames()
Returns the symbol outputs.
|
java.util.Map<java.lang.String,ai.djl.ndarray.types.Shape> |
inferShape(ai.djl.util.PairList<java.lang.String,ai.djl.ndarray.types.Shape> pairs)
Infers the shapes for all parameters inside a symbol from the given input shapes.
|
static Symbol |
load(MxNDManager manager,
java.lang.String path)
Loads a symbol from a path.
|
java.lang.String |
toString() |
finalize, getHandle, getUid, isReleasedpublic static Symbol load(MxNDManager manager, java.lang.String path)
manager - the manager to load the symbol topath - the path to the symbol filepublic java.lang.String[] getArgNames()
public java.lang.String[] getAuxNames()
public java.lang.String[] getAllNames()
public java.lang.String[] getOutputNames()
public Symbol copy()
public Symbol get(int index)
index - the index of the outputpublic Symbol get(java.lang.String name)
name - the name of the symbol to returnjava.lang.IllegalArgumentException - Thrown if no output matches the namepublic Symbol getInternals()
public java.util.List<java.lang.String> getLayerNames()
public java.util.Map<java.lang.String,ai.djl.ndarray.types.Shape> inferShape(ai.djl.util.PairList<java.lang.String,ai.djl.ndarray.types.Shape> pairs)
pairs - the given input name and shapepublic java.lang.String toString()
toString in class java.lang.Objectpublic void close()
close in interface java.lang.AutoCloseableclose in class NativeResource