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 2019/03/23 00:59:48 UTC
[systemml] branch gh-pages updated: [SYSTEMML-540] Added zero
padding layer in Caffe2DML, Keras2DML and nn library
This is an automated email from the ASF dual-hosted git repository.
niketanpansare pushed a commit to branch gh-pages
in repository https://gitbox.apache.org/repos/asf/systemml.git
The following commit(s) were added to refs/heads/gh-pages by this push:
new eda02d0 [SYSTEMML-540] Added zero padding layer in Caffe2DML, Keras2DML and nn library
eda02d0 is described below
commit eda02d00f8ae826b488f98c0193d515f65f68686
Author: Niketan Pansare <np...@us.ibm.com>
AuthorDate: Fri Mar 22 17:57:51 2019 -0700
[SYSTEMML-540] Added zero padding layer in Caffe2DML, Keras2DML and nn library
- Updated the tests and the documentation.
- This layer is required for ResNet-50 demo with Keras2DML.
---
beginners-guide-keras2dml.md | 6 +++++-
reference-guide-caffe2dml.md | 30 ++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/beginners-guide-keras2dml.md b/beginners-guide-keras2dml.md
index 60de360..4517be5 100644
--- a/beginners-guide-keras2dml.md
+++ b/beginners-guide-keras2dml.md
@@ -161,12 +161,16 @@ sysml_model.fit(features, labels)
#### What optimizer and loss does Keras2DML use by default if `keras_model` is not compiled ?
-If the user does not `compile` the keras model, then we use cross entropy loss and SGD optimizer with nesterov momentum:
+If the user does not `compile` the keras model, then we throw an error.
+
+For classification applications, you can consider using cross entropy loss and SGD optimizer with nesterov momentum:
```python
keras_model.compile(loss='categorical_crossentropy', optimizer=keras.optimizers.SGD(lr=0.01, momentum=0.95, decay=5e-4, nesterov=True))
```
+Please refer to [Keras's documentation](https://keras.io/losses/) for more detail.
+
#### What is the learning rate schedule used ?
Keras2DML does not support the `LearningRateScheduler` callback.
diff --git a/reference-guide-caffe2dml.md b/reference-guide-caffe2dml.md
index 8e2ed1f..381b96d 100644
--- a/reference-guide-caffe2dml.md
+++ b/reference-guide-caffe2dml.md
@@ -139,6 +139,36 @@ layer {
}
```
+### Padding Layer
+
+Invokes [nn/layers/zero_pad2d.dml](https://github.com/apache/systemml/blob/master/scripts/nn/layers/zero_pad2d.dml) layer.
+
+**Optional Parameters:**
+
+- top_pad: Padding for top side (default: 0).
+- bottom_pad: Padding for bottom side (default: 0).
+- left_pad: Padding for left side (default: 0).
+- right_pad: Padding for right side (default: 0).
+- right_pad: Padding for right side (default: 0).
+- pad_value: value to use for padding (default: 0). Only zero padding supported for now.
+
+**Sample Usage:**
+```
+layer {
+ name: "padding1"
+ type: "Padding"
+ bottom: "pool1"
+ top: "padding1"
+ padding_param {
+ top_pad = 1
+ bottom_pad = 1
+ left_pad = 1
+ right_pad = 1
+ pad_value = 0
+ }
+}
+```
+
### Deconvolution Layer