You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by jx...@apache.org on 2018/01/26 21:21:17 UTC
[incubator-mxnet] branch master updated: fix CreateOp of altering
shape operations to accept dtypes of uint8 and int32 (#9569)
This is an automated email from the ASF dual-hosted git repository.
jxie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 55163bd fix CreateOp of altering shape operations to accept dtypes of uint8 and int32 (#9569)
55163bd is described below
commit 55163bd39e8ff10632e1cffd505a6759fc5644bd
Author: Soonhwan-Kwon <So...@users.noreply.github.com>
AuthorDate: Sat Jan 27 06:21:12 2018 +0900
fix CreateOp of altering shape operations to accept dtypes of uint8 and int32 (#9569)
* fix CreateOp of shape related operation to accept dtypes of uint8 and int32
* fix wrong argument y to sequence_length in sequence_reverse's api document
* fix wrong argument y to sequence_length in api doc
fix wrong argument y to sequence_length in api doc
* remove y in api document
---
src/operator/sequence_last.cc | 10 +++++-----
src/operator/sequence_last.cu | 2 +-
src/operator/sequence_mask.cc | 6 +++---
src/operator/sequence_mask.cu | 2 +-
src/operator/sequence_reverse.cc | 6 +++---
src/operator/sequence_reverse.cu | 2 +-
src/operator/swapaxis.cc | 2 +-
src/operator/swapaxis.cu | 2 +-
8 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/src/operator/sequence_last.cc b/src/operator/sequence_last.cc
index d943cd6..f87400b 100644
--- a/src/operator/sequence_last.cc
+++ b/src/operator/sequence_last.cc
@@ -30,7 +30,7 @@ namespace op {
template <>
Operator *CreateOp<cpu>(SequenceLastParam param, int dtype) {
Operator *op = NULL;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType,
+ MSHADOW_TYPE_SWITCH(dtype, DType,
{ op = new SequenceLastOp<cpu, DType>(param); })
return op;
}
@@ -77,14 +77,14 @@ Example::
[ 22., 23., 24.],
[ 25., 26., 27.]]
- // sequence_length y is used
- SequenceLast(x, y=[1,1,1], use_sequence_length=True) =
+ // sequence_length is used
+ SequenceLast(x, sequence_length=[1,1,1], use_sequence_length=True) =
[[ 1., 2., 3.],
[ 4., 5., 6.],
[ 7., 8., 9.]]
- // sequence_length y is used
- SequenceLast(x, y=[1,2,3], use_sequence_length=True) =
+ // sequence_length is used
+ SequenceLast(x, sequence_length=[1,2,3], use_sequence_length=True) =
[[ 1., 2., 3.],
[ 13., 14., 15.],
[ 25., 26., 27.]]
diff --git a/src/operator/sequence_last.cu b/src/operator/sequence_last.cu
index c63369d..dfc4e59 100644
--- a/src/operator/sequence_last.cu
+++ b/src/operator/sequence_last.cu
@@ -30,7 +30,7 @@ namespace mxnet {
namespace op {
template <> Operator *CreateOp<gpu>(SequenceLastParam param, int dtype) {
Operator *op = NULL;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType,
+ MSHADOW_TYPE_SWITCH(dtype, DType,
{ op = new SequenceLastOp<gpu, DType>(param); })
return op;
}
diff --git a/src/operator/sequence_mask.cc b/src/operator/sequence_mask.cc
index 48a9768..047634c 100644
--- a/src/operator/sequence_mask.cc
+++ b/src/operator/sequence_mask.cc
@@ -30,7 +30,7 @@ namespace op {
template <>
Operator *CreateOp<cpu>(SequenceMaskParam param, int dtype) {
Operator *op = NULL;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType,
+ MSHADOW_TYPE_SWITCH(dtype, DType,
{ op = new SequenceMaskOp<cpu, DType>(param); })
return op;
}
@@ -89,7 +89,7 @@ Example::
// sequence_length [1,1] means 1 of each batch will be kept
// and other rows are masked with default mask value = 0
- SequenceMask(x, y=[1,1], use_sequence_length=True) =
+ SequenceMask(x, sequence_length=[1,1], use_sequence_length=True) =
[[[ 1., 2., 3.],
[ 4., 5., 6.]],
@@ -101,7 +101,7 @@ Example::
// sequence_length [2,3] means 2 of batch B1 and 3 of batch B2 will be kept
// and other rows are masked with value = 1
- SequenceMask(x, y=[2,3], use_sequence_length=True, value=1) =
+ SequenceMask(x, sequence_length=[2,3], use_sequence_length=True, value=1) =
[[[ 1., 2., 3.],
[ 4., 5., 6.]],
diff --git a/src/operator/sequence_mask.cu b/src/operator/sequence_mask.cu
index b82157a..2ca8832 100644
--- a/src/operator/sequence_mask.cu
+++ b/src/operator/sequence_mask.cu
@@ -31,7 +31,7 @@ namespace op {
template <> Operator *CreateOp<gpu>(SequenceMaskParam param, int dtype) {
Operator *op = NULL;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType,
+ MSHADOW_TYPE_SWITCH(dtype, DType,
{ op = new SequenceMaskOp<gpu, DType>(param); })
return op;
}
diff --git a/src/operator/sequence_reverse.cc b/src/operator/sequence_reverse.cc
index 9a2f698..834e4f4 100644
--- a/src/operator/sequence_reverse.cc
+++ b/src/operator/sequence_reverse.cc
@@ -30,7 +30,7 @@ namespace op {
template <>
Operator *CreateOp<cpu>(SequenceReverseParam param, int dtype) {
Operator *op = NULL;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType,
+ MSHADOW_TYPE_SWITCH(dtype, DType,
{ op = new SequenceReverseOp<cpu, DType>(param); })
return op;
}
@@ -88,7 +88,7 @@ Example::
// sequence_length [2,2] means 2 rows of
// both batch B1 and B2 will be reversed.
- SequenceReverse(x, y=[2,2], use_sequence_length=True) =
+ SequenceReverse(x, sequence_length=[2,2], use_sequence_length=True) =
[[[ 7., 8., 9.],
[ 10., 11., 12.]],
@@ -100,7 +100,7 @@ Example::
// sequence_length [2,3] means 2 of batch B2 and 3 of batch B3
// will be reversed.
- SequenceReverse(x, y=[2,3], use_sequence_length=True) =
+ SequenceReverse(x, sequence_length=[2,3], use_sequence_length=True) =
[[[ 7., 8., 9.],
[ 16., 17., 18.]],
diff --git a/src/operator/sequence_reverse.cu b/src/operator/sequence_reverse.cu
index 531fde1..9c15748 100644
--- a/src/operator/sequence_reverse.cu
+++ b/src/operator/sequence_reverse.cu
@@ -30,7 +30,7 @@ namespace mxnet {
namespace op {
template <> Operator *CreateOp<gpu>(SequenceReverseParam param, int dtype) {
Operator *op = NULL;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType, {
+ MSHADOW_TYPE_SWITCH(dtype, DType, {
op = new SequenceReverseOp<gpu, DType>(param);
})
return op;
diff --git a/src/operator/swapaxis.cc b/src/operator/swapaxis.cc
index 0b32db7..12bc52e 100644
--- a/src/operator/swapaxis.cc
+++ b/src/operator/swapaxis.cc
@@ -32,7 +32,7 @@ namespace op {
template<>
Operator* CreateOp<cpu>(SwapAxisParam param, int dtype) {
Operator *op = NULL;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType, {
+ MSHADOW_TYPE_SWITCH(dtype, DType, {
op = new SwapAxisOp<cpu, DType>(param);
});
return op;
diff --git a/src/operator/swapaxis.cu b/src/operator/swapaxis.cu
index e622958..90dcefd 100644
--- a/src/operator/swapaxis.cu
+++ b/src/operator/swapaxis.cu
@@ -32,7 +32,7 @@ namespace op {
template<>
Operator *CreateOp<gpu>(SwapAxisParam param, int dtype) {
Operator *op = NULL;
- MSHADOW_REAL_TYPE_SWITCH(dtype, DType, {
+ MSHADOW_TYPE_SWITCH(dtype, DType, {
op = new SwapAxisOp<gpu, DType>(param);
});
return op;
--
To stop receiving notification emails like this one, please contact
jxie@apache.org.