public class LibMatrixDNN extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DISPLAY_STATISTICS |
protected static org.apache.commons.logging.Log |
LOG |
static boolean |
SUPPORTS_SPARSE_OUTPUTS |
static boolean |
TEST_SPARSE_FILTER |
static boolean |
TEST_SPARSE_INPUT |
Constructor and Description |
---|
LibMatrixDNN() |
Modifier and Type | Method and Description |
---|---|
static void |
appendStatistics(StringBuilder sb) |
static void |
biasAdd(MatrixBlock input,
MatrixBlock bias,
MatrixBlock outputBlock,
int numThreads)
Performs the operation corresponding to the DML script:
ones = matrix(1, rows=1, cols=Hout*Wout)
output = input + matrix(bias %*% ones, rows=1, cols=F*Hout*Wout)
This operation is often followed by conv2d and hence we have introduced bias_add(input, bias) built-in function
|
static void |
biasMultiply(MatrixBlock input,
MatrixBlock bias,
MatrixBlock outputBlock,
int numThreads)
Performs the operation corresponding to the DML script:
ones = matrix(1, rows=1, cols=Hout*Wout)
output = input * matrix(bias %*% ones, rows=1, cols=F*Hout*Wout)
This operation is often followed by conv2d and hence we have introduced bias_multiply(input, bias) built-in function
|
static void |
conv2d(MatrixBlock input,
MatrixBlock filter,
MatrixBlock outputBlock,
ConvolutionParameters params) |
static void |
conv2dBackwardData(MatrixBlock filter,
MatrixBlock dout,
MatrixBlock outputBlock,
ConvolutionParameters params)
This method computes the backpropogation errors for previous layer of convolution operation
|
static void |
conv2dBackwardFilter(MatrixBlock input,
MatrixBlock dout,
MatrixBlock outputBlock,
ConvolutionParameters params)
This method computes the backpropogation errors for filter of convolution operation
|
static void |
maxpooling(MatrixBlock input,
MatrixBlock outputBlock,
ConvolutionParameters params) |
static void |
maxpoolingBackward(MatrixBlock input,
MatrixBlock dout,
MatrixBlock outputBlock,
ConvolutionParameters params)
This method computes the backpropogation errors for previous layer of maxpooling operation
|
static void |
reluBackward(MatrixBlock input,
MatrixBlock dout,
MatrixBlock outputBlock,
int numThreads)
This method computes the backpropagation errors for previous layer of relu operation
|
static void |
resetStatistics() |
protected static final org.apache.commons.logging.Log LOG
public static final boolean SUPPORTS_SPARSE_OUTPUTS
public static boolean DISPLAY_STATISTICS
public static boolean TEST_SPARSE_INPUT
public static boolean TEST_SPARSE_FILTER
public static void appendStatistics(StringBuilder sb)
public static void resetStatistics()
public static void conv2dBackwardData(MatrixBlock filter, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException
filter
- filter used in conv2ddout
- errors from next layeroutputBlock
- output errorsparams
- convolution parametersDMLRuntimeException
- if DMLRuntimeException occurspublic static void conv2dBackwardFilter(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException
input
- input imagedout
- errors from next layeroutputBlock
- output errorsparams
- convolution parametersDMLRuntimeException
- if DMLRuntimeException occurspublic static void conv2d(MatrixBlock input, MatrixBlock filter, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException
DMLRuntimeException
public static void maxpoolingBackward(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException
input
- input matrixdout
- dout matrixoutputBlock
- output matrixparams
- convolution parametersDMLRuntimeException
- if DMLRuntimeException occurspublic static void reluBackward(MatrixBlock input, MatrixBlock dout, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException
input
- input matrixdout
- errors from next layeroutputBlock
- output matrixnumThreads
- number of threadsDMLRuntimeException
- if DMLRuntimeException occurspublic static void biasAdd(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException
input
- input matrixbias
- bias matrixoutputBlock
- output matrixnumThreads
- number of threadsDMLRuntimeException
- if DMLRuntimeException occurspublic static void biasMultiply(MatrixBlock input, MatrixBlock bias, MatrixBlock outputBlock, int numThreads) throws DMLRuntimeException
input
- input matrixbias
- bias matrixoutputBlock
- output matrixnumThreads
- number of threadsDMLRuntimeException
- if DMLRuntimeException occurspublic static void maxpooling(MatrixBlock input, MatrixBlock outputBlock, ConvolutionParameters params) throws DMLRuntimeException
DMLRuntimeException
Copyright © 2017 The Apache Software Foundation. All rights reserved.