public class SDRNN extends SDOps
| Modifier and Type | Method and Description |
|---|---|
SDVariable |
gru(SDVariable x,
SDVariable hLast,
SDVariable Wx,
SDVariable Wh,
SDVariable biases)
The GRU operation.
|
SDVariable |
gru(String name,
SDVariable x,
SDVariable hLast,
SDVariable Wx,
SDVariable Wh,
SDVariable biases)
The GRU operation.
|
SDVariable[] |
gruCell(SDVariable x,
SDVariable hLast,
GRUWeights GRUWeights)
The GRU cell.
|
SDVariable[] |
gruCell(String[] names,
SDVariable x,
SDVariable hLast,
GRUWeights GRUWeights)
The GRU cell.
|
SDVariable |
lstmblock(SDVariable x,
LSTMWeights LSTMWeights,
LSTMConfiguration LSTMConfiguration)
The LSTM block
|
SDVariable |
lstmblock(SDVariable maxTSLength,
SDVariable x,
SDVariable cLast,
SDVariable yLast,
LSTMWeights LSTMWeights,
LSTMConfiguration LSTMConfiguration)
The LSTM block
|
SDVariable |
lstmblock(String name,
SDVariable x,
LSTMWeights LSTMWeights,
LSTMConfiguration LSTMConfiguration)
The LSTM block
|
SDVariable |
lstmblock(String name,
SDVariable maxTSLength,
SDVariable x,
SDVariable cLast,
SDVariable yLast,
LSTMWeights LSTMWeights,
LSTMConfiguration LSTMConfiguration)
The LSTM block
|
SDVariable[] |
lstmCell(SDVariable x,
SDVariable cLast,
SDVariable yLast,
LSTMWeights LSTMWeights,
LSTMConfiguration LSTMConfiguration)
The LSTM cell.
|
SDVariable[] |
lstmCell(String[] names,
SDVariable x,
SDVariable cLast,
SDVariable yLast,
LSTMWeights LSTMWeights,
LSTMConfiguration LSTMConfiguration)
The LSTM cell.
|
SDVariable[] |
lstmLayer(SDVariable x,
LSTMLayerWeights LSTMLayerWeights,
LSTMLayerConfig LSTMLayerConfig)
Long Short-Term Memory layer - Hochreiter 1997.
SUPPORTS following data formats: for unidirectional: TNS: shapes [timeLength, numExamples, inOutSize] NST: shapes [numExamples, inOutSize, timeLength] NTS: shapes [numExamples, timeLength, inOutSize] for bidirectional: T2NS: shapes [timeLength, 2, numExamples, inOutSize] (for ONNX) SUPPORTS following direction modes: FWD: forward BWD: backward BIDIR_SUM: bidirectional sum BIDIR_CONCAT: bidirectional concat BIDIR_EXTRA_DIM: bidirectional extra output dim (in conjunction with format dataFormat - T2NS) You may use different gate configurations: specify gate/cell/out aplha/beta and numbers of activations for gate/cell/out described in activations enum ("RELU","SIGMOID","AFFINE","LEAKY_RELU","THRESHHOLD_RELU","SCALED_TAHN","HARD_SIGMOID","ELU","SOFTSIGN","SOFTPLUS") Also this layer supports MKLDNN (DNNL) and cuDNN acceleration |
SDVariable[] |
lstmLayer(SDVariable x,
SDVariable cLast,
SDVariable yLast,
SDVariable maxTSLength,
LSTMLayerWeights LSTMLayerWeights,
LSTMLayerConfig LSTMLayerConfig)
Long Short-Term Memory layer - Hochreiter 1997.
SUPPORTS following data formats: for unidirectional: TNS: shapes [timeLength, numExamples, inOutSize] NST: shapes [numExamples, inOutSize, timeLength] NTS: shapes [numExamples, timeLength, inOutSize] for bidirectional: T2NS: shapes [timeLength, 2, numExamples, inOutSize] (for ONNX) SUPPORTS following direction modes: FWD: forward BWD: backward BIDIR_SUM: bidirectional sum BIDIR_CONCAT: bidirectional concat BIDIR_EXTRA_DIM: bidirectional extra output dim (in conjunction with format dataFormat - T2NS) You may use different gate configurations: specify gate/cell/out aplha/beta and numbers of activations for gate/cell/out described in activations enum ("RELU","SIGMOID","AFFINE","LEAKY_RELU","THRESHHOLD_RELU","SCALED_TAHN","HARD_SIGMOID","ELU","SOFTSIGN","SOFTPLUS") Also this layer supports MKLDNN (DNNL) and cuDNN acceleration |
SDVariable[] |
lstmLayer(String[] names,
SDVariable x,
LSTMLayerWeights LSTMLayerWeights,
LSTMLayerConfig LSTMLayerConfig)
Long Short-Term Memory layer - Hochreiter 1997.
SUPPORTS following data formats: for unidirectional: TNS: shapes [timeLength, numExamples, inOutSize] NST: shapes [numExamples, inOutSize, timeLength] NTS: shapes [numExamples, timeLength, inOutSize] for bidirectional: T2NS: shapes [timeLength, 2, numExamples, inOutSize] (for ONNX) SUPPORTS following direction modes: FWD: forward BWD: backward BIDIR_SUM: bidirectional sum BIDIR_CONCAT: bidirectional concat BIDIR_EXTRA_DIM: bidirectional extra output dim (in conjunction with format dataFormat - T2NS) You may use different gate configurations: specify gate/cell/out aplha/beta and numbers of activations for gate/cell/out described in activations enum ("RELU","SIGMOID","AFFINE","LEAKY_RELU","THRESHHOLD_RELU","SCALED_TAHN","HARD_SIGMOID","ELU","SOFTSIGN","SOFTPLUS") Also this layer supports MKLDNN (DNNL) and cuDNN acceleration |
SDVariable[] |
lstmLayer(String[] names,
SDVariable x,
SDVariable cLast,
SDVariable yLast,
SDVariable maxTSLength,
LSTMLayerWeights LSTMLayerWeights,
LSTMLayerConfig LSTMLayerConfig)
Long Short-Term Memory layer - Hochreiter 1997.
SUPPORTS following data formats: for unidirectional: TNS: shapes [timeLength, numExamples, inOutSize] NST: shapes [numExamples, inOutSize, timeLength] NTS: shapes [numExamples, timeLength, inOutSize] for bidirectional: T2NS: shapes [timeLength, 2, numExamples, inOutSize] (for ONNX) SUPPORTS following direction modes: FWD: forward BWD: backward BIDIR_SUM: bidirectional sum BIDIR_CONCAT: bidirectional concat BIDIR_EXTRA_DIM: bidirectional extra output dim (in conjunction with format dataFormat - T2NS) You may use different gate configurations: specify gate/cell/out aplha/beta and numbers of activations for gate/cell/out described in activations enum ("RELU","SIGMOID","AFFINE","LEAKY_RELU","THRESHHOLD_RELU","SCALED_TAHN","HARD_SIGMOID","ELU","SOFTSIGN","SOFTPLUS") Also this layer supports MKLDNN (DNNL) and cuDNN acceleration |
SDVariable |
sru(SDVariable x,
SDVariable initialC,
SDVariable mask,
SRUWeights SRUWeights)
The SRU layer.
|
SDVariable |
sru(SDVariable x,
SDVariable initialC,
SRUWeights SRUWeights)
The SRU layer.
|
SDVariable |
sru(String name,
SDVariable x,
SDVariable initialC,
SDVariable mask,
SRUWeights SRUWeights)
The SRU layer.
|
SDVariable |
sru(String name,
SDVariable x,
SDVariable initialC,
SRUWeights SRUWeights)
The SRU layer.
|
SDVariable |
sruCell(SDVariable x,
SDVariable cLast,
SRUWeights SRUWeights)
The SRU layer.
|
SDVariable |
sruCell(String name,
SDVariable x,
SDVariable cLast,
SRUWeights SRUWeights)
The SRU layer.
|
public SDRNN(SameDiff sameDiff)
public SDVariable gru(SDVariable x, SDVariable hLast, SDVariable Wx, SDVariable Wh, SDVariable biases)
x - input [time, bS, nIn] (NUMERIC type)hLast - initial cell output (at time step = 0) [bS, nOut] (NUMERIC type)Wx - input-to-hidden weights, [nIn, 3*nOut] (NUMERIC type)Wh - hidden-to-hidden weights, [nOut, 3*nOut] (NUMERIC type)biases - biases, [3*nOut] (NUMERIC type)public SDVariable gru(String name, SDVariable x, SDVariable hLast, SDVariable Wx, SDVariable Wh, SDVariable biases)
name - name May be null. Name for the output variablex - input [time, bS, nIn] (NUMERIC type)hLast - initial cell output (at time step = 0) [bS, nOut] (NUMERIC type)Wx - input-to-hidden weights, [nIn, 3*nOut] (NUMERIC type)Wh - hidden-to-hidden weights, [nOut, 3*nOut] (NUMERIC type)biases - biases, [3*nOut] (NUMERIC type)public SDVariable[] gruCell(SDVariable x, SDVariable hLast, GRUWeights GRUWeights)
x - Input, with shape [batchSize, inSize] (NUMERIC type)hLast - Output of the previous cell/time step, with shape [batchSize, numUnits] (NUMERIC type)GRUWeights - Configuration Objectpublic SDVariable[] gruCell(String[] names, SDVariable x, SDVariable hLast, GRUWeights GRUWeights)
names - names May be null. Arrays of names for the output variables.x - Input, with shape [batchSize, inSize] (NUMERIC type)hLast - Output of the previous cell/time step, with shape [batchSize, numUnits] (NUMERIC type)GRUWeights - Configuration Objectpublic SDVariable[] lstmCell(SDVariable x, SDVariable cLast, SDVariable yLast, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)
x - Input, with shape [batchSize, inSize] (NUMERIC type)cLast - Previous cell state, with shape [batchSize, numUnits] (NUMERIC type)yLast - revious cell output, with shape [batchSize, numUnits] (NUMERIC type)LSTMWeights - Configuration ObjectLSTMConfiguration - Configuration Objectpublic SDVariable[] lstmCell(String[] names, SDVariable x, SDVariable cLast, SDVariable yLast, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)
names - names May be null. Arrays of names for the output variables.x - Input, with shape [batchSize, inSize] (NUMERIC type)cLast - Previous cell state, with shape [batchSize, numUnits] (NUMERIC type)yLast - revious cell output, with shape [batchSize, numUnits] (NUMERIC type)LSTMWeights - Configuration ObjectLSTMConfiguration - Configuration Objectpublic SDVariable[] lstmLayer(SDVariable x, SDVariable cLast, SDVariable yLast, SDVariable maxTSLength, LSTMLayerWeights LSTMLayerWeights, LSTMLayerConfig LSTMLayerConfig)
x - Input, with shape dependent on the data format (in config). (NUMERIC type)cLast - Previous/initial cell state, with shape [batchSize, numUnits] (NUMERIC type)yLast - Previous/initial cell output, with shape [batchSize, numUnits] (NUMERIC type)maxTSLength - maxTSLength with shape [batchSize] (NUMERIC type)LSTMLayerWeights - Configuration ObjectLSTMLayerConfig - Configuration Objectpublic SDVariable[] lstmLayer(String[] names, SDVariable x, SDVariable cLast, SDVariable yLast, SDVariable maxTSLength, LSTMLayerWeights LSTMLayerWeights, LSTMLayerConfig LSTMLayerConfig)
names - names May be null. Arrays of names for the output variables.x - Input, with shape dependent on the data format (in config). (NUMERIC type)cLast - Previous/initial cell state, with shape [batchSize, numUnits] (NUMERIC type)yLast - Previous/initial cell output, with shape [batchSize, numUnits] (NUMERIC type)maxTSLength - maxTSLength with shape [batchSize] (NUMERIC type)LSTMLayerWeights - Configuration ObjectLSTMLayerConfig - Configuration Objectpublic SDVariable[] lstmLayer(SDVariable x, LSTMLayerWeights LSTMLayerWeights, LSTMLayerConfig LSTMLayerConfig)
x - Input, with shape dependent on the data format (in config). (NUMERIC type)LSTMLayerWeights - Configuration ObjectLSTMLayerConfig - Configuration Objectpublic SDVariable[] lstmLayer(String[] names, SDVariable x, LSTMLayerWeights LSTMLayerWeights, LSTMLayerConfig LSTMLayerConfig)
names - names May be null. Arrays of names for the output variables.x - Input, with shape dependent on the data format (in config). (NUMERIC type)LSTMLayerWeights - Configuration ObjectLSTMLayerConfig - Configuration Objectpublic SDVariable lstmblock(SDVariable maxTSLength, SDVariable x, SDVariable cLast, SDVariable yLast, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)
maxTSLength - (NUMERIC type)x - Input, with shape dependent on the data format (in config). (NUMERIC type)cLast - Previous/initial cell state, with shape [batchSize, numUnits] (NUMERIC type)yLast - Previous/initial cell output, with shape [batchSize, numUnits] (NUMERIC type)LSTMWeights - Configuration ObjectLSTMConfiguration - Configuration Objectpublic SDVariable lstmblock(String name, SDVariable maxTSLength, SDVariable x, SDVariable cLast, SDVariable yLast, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)
name - name May be null. Name for the output variablemaxTSLength - (NUMERIC type)x - Input, with shape dependent on the data format (in config). (NUMERIC type)cLast - Previous/initial cell state, with shape [batchSize, numUnits] (NUMERIC type)yLast - Previous/initial cell output, with shape [batchSize, numUnits] (NUMERIC type)LSTMWeights - Configuration ObjectLSTMConfiguration - Configuration Objectpublic SDVariable lstmblock(SDVariable x, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)
x - Input, with shape dependent on the data format (in config). (NUMERIC type)LSTMWeights - Configuration ObjectLSTMConfiguration - Configuration Objectpublic SDVariable lstmblock(String name, SDVariable x, LSTMWeights LSTMWeights, LSTMConfiguration LSTMConfiguration)
name - name May be null. Name for the output variablex - Input, with shape dependent on the data format (in config). (NUMERIC type)LSTMWeights - Configuration ObjectLSTMConfiguration - Configuration Objectpublic SDVariable sru(SDVariable x, SDVariable initialC, SDVariable mask, SRUWeights SRUWeights)
x - Input, with shape [batchSize, inSize] (NUMERIC type)initialC - Initial cell state, with shape [batchSize, inSize] (NUMERIC type)mask - An optional dropout mask, with shape [batchSize, inSize] (NUMERIC type)SRUWeights - Configuration Objectpublic SDVariable sru(String name, SDVariable x, SDVariable initialC, SDVariable mask, SRUWeights SRUWeights)
name - name May be null. Name for the output variablex - Input, with shape [batchSize, inSize] (NUMERIC type)initialC - Initial cell state, with shape [batchSize, inSize] (NUMERIC type)mask - An optional dropout mask, with shape [batchSize, inSize] (NUMERIC type)SRUWeights - Configuration Objectpublic SDVariable sru(SDVariable x, SDVariable initialC, SRUWeights SRUWeights)
x - Input, with shape [batchSize, inSize] (NUMERIC type)initialC - Initial cell state, with shape [batchSize, inSize] (NUMERIC type)SRUWeights - Configuration Objectpublic SDVariable sru(String name, SDVariable x, SDVariable initialC, SRUWeights SRUWeights)
name - name May be null. Name for the output variablex - Input, with shape [batchSize, inSize] (NUMERIC type)initialC - Initial cell state, with shape [batchSize, inSize] (NUMERIC type)SRUWeights - Configuration Objectpublic SDVariable sruCell(SDVariable x, SDVariable cLast, SRUWeights SRUWeights)
x - Input, with shape [batchSize, inSize] (NUMERIC type)cLast - Previous cell state, with shape [batchSize, inSize] (NUMERIC type)SRUWeights - Configuration Objectpublic SDVariable sruCell(String name, SDVariable x, SDVariable cLast, SRUWeights SRUWeights)
name - name May be null. Name for the output variablex - Input, with shape [batchSize, inSize] (NUMERIC type)cLast - Previous cell state, with shape [batchSize, inSize] (NUMERIC type)SRUWeights - Configuration ObjectCopyright © 2021. All rights reserved.