[SYSTEMML-1661] Added the documentation for bias_add and bias_multiply builtin function.
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/cc0988bf Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/cc0988bf Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/cc0988bf Branch: refs/heads/gh-pages Commit: cc0988bff186363a15904182deb80fbe942e9577 Parents: e786acc Author: Niketan Pansare <[email protected]> Authored: Sat Jun 3 17:05:38 2017 -0700 Committer: Niketan Pansare <[email protected]> Committed: Sat Jun 3 17:06:32 2017 -0700 ---------------------------------------------------------------------- dml-language-reference.md | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/cc0988bf/dml-language-reference.md ---------------------------------------------------------------------- diff --git a/dml-language-reference.md b/dml-language-reference.md index 9273857..d80e62c 100644 --- a/dml-language-reference.md +++ b/dml-language-reference.md @@ -1507,25 +1507,28 @@ The images are assumed to be stored NCHW format, where N = batch size, C = #chan Hence, the images are internally represented as a matrix with dimension (N, C * H * W). -| Function name | Input matrices | Input Parameters | Notes | -|------------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------| -| conv2d | input, filter | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], filter_shape=[numFilters, numChannels, height_filter, width_filter] | Performs 2D convolution operation | -| conv2d_backward_filter | input, dout | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], filter_shape=[numFilters, numChannels, height_filter, width_filter] | Computes the gradients wrt filter of 2D convolution | -| conv2d_backward_data | filter, dout | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], filter_shape=[numFilters, numChannels, height_filter, width_filter] | Computes the gradients wrt input of 2D convolution | -| max_pool | input | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], pool_size=[height_pool, width_pool] | Performs max pooling operation | -| max_pool_backward | input, dout | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], pool_size=[height_pool, width_pool] | Computes the gradients wrt input of 2D maxpooling | +| Function name | Input matrices | Input Parameters | Notes | +|------------------------|----------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------| +| conv2d | input, filter | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], filter_shape=[numFilters, numChannels, height_filter, width_filter] | Performs 2D convolution operation | +| conv2d_backward_filter | input, dout | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], filter_shape=[numFilters, numChannels, height_filter, width_filter] | Computes the gradients wrt filter of 2D convolution | +| conv2d_backward_data | filter, dout | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], filter_shape=[numFilters, numChannels, height_filter, width_filter] | Computes the gradients wrt input of 2D convolution | +| max_pool | input | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], pool_size=[height_pool, width_pool] | Performs max pooling operation | +| max_pool_backward | input, dout | stride=[stride_h, stride_w], padding=[pad_h, pad_w], input_shape=[batch_size, num_channels, height_image, width_image], pool_size=[height_pool, width_pool] | Computes the gradients wrt input of 2D maxpooling | +| bias_add | input, bias | | Adds the bias (row vector of size numChannels) to input with the given numChannels | +| bias_multiply | input, bias | | Multiplies the bias (row vector of size numChannels) to input with the given numChannels | Examples: -| Function | Parameters | Visualization | +| Function | Parameters | Visualization / Equivalent DML | |----------------------|-----------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------| | conv2d | stride=[1,1] |  | | conv2d | stride=[2,2] |  | | conv2d_backward_data | stride=[1,1] |  | | conv2d_backward_data | stride=[2,2] |  | | conv2d_backward_data | stride=[2,2] and 2x2 filter |  | - +| bias_add | | `ones = matrix(1, rows=1, cols=height*width); output = input + matrix(bias %*% ones, rows=1, cols=numChannels*height*width)` | +| bias_multiply | | `ones = matrix(1, rows=1, cols=height*width); output = input * matrix(bias %*% ones, rows=1, cols=numChannels*height*width)` | ### Other Built-In Functions
