You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by ni...@apache.org on 2017/06/04 00:07:41 UTC
incubator-systemml git commit: [SYSTEMML-1661] Added the
documentation for bias_add and bias_multiply builtin function.
Repository: incubator-systemml
Updated Branches:
refs/heads/master 7ed36a98f -> 88f4a468f
[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/88f4a468
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/88f4a468
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/88f4a468
Branch: refs/heads/master
Commit: 88f4a468f48081031d926d917ebc4f3e9014fc7f
Parents: 7ed36a9
Author: Niketan Pansare <np...@us.ibm.com>
Authored: Sat Jun 3 17:05:38 2017 -0700
Committer: Niketan Pansare <np...@us.ibm.com>
Committed: Sat Jun 3 17:06:32 2017 -0700
----------------------------------------------------------------------
docs/dml-language-reference.md | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/88f4a468/docs/dml-language-reference.md
----------------------------------------------------------------------
diff --git a/docs/dml-language-reference.md b/docs/dml-language-reference.md
index 9273857..d80e62c 100644
--- a/docs/dml-language-reference.md
+++ b/docs/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 with stride 1](img/dml-language-reference/Conv2d.gif "conv2d with stride 1") |
| conv2d | stride=[2,2] | ![conv2d with stride 2](img/dml-language-reference/Conv2d1.gif "conv2d with stride 2") |
| conv2d_backward_data | stride=[1,1] | ![conv2d_backward_data with stride 1](img/dml-language-reference/Conv2d_backward_data.gif "conv2d_backward_data with stride 1") |
| conv2d_backward_data | stride=[2,2] | ![conv2d_backward_data with stride 2](img/dml-language-reference/Conv2d_backward_data1.gif "conv2d_backward_data with stride 2") |
| conv2d_backward_data | stride=[2,2] and 2x2 filter | ![conv2d_backward_data with stride 2 2x2 filter](img/dml-language-reference/Conv2d_backward_data1.gif "conv2d_backward_data with stride 2 with 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