You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ak...@apache.org on 2021/09/22 11:19:48 UTC

[incubator-mxnet] branch master updated: [BUGFIX] Fix (de)conv (#20597)

This is an automated email from the ASF dual-hosted git repository.

akarbown 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 0f5ba51  [BUGFIX] Fix (de)conv (#20597)
0f5ba51 is described below

commit 0f5ba51602bfee3deb1355ecc12cf1f2f17f57a1
Author: Zhenghui Jin <69...@users.noreply.github.com>
AuthorDate: Wed Sep 22 04:17:17 2021 -0700

    [BUGFIX] Fix (de)conv (#20597)
    
    * fix (de)conv assert
    
    * fix comment
---
 python/mxnet/ndarray/numpy_extension/_op.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/python/mxnet/ndarray/numpy_extension/_op.py b/python/mxnet/ndarray/numpy_extension/_op.py
index ae11080..63ff99e 100644
--- a/python/mxnet/ndarray/numpy_extension/_op.py
+++ b/python/mxnet/ndarray/numpy_extension/_op.py
@@ -599,8 +599,8 @@ def convolution(data=None, weight=None, bias=None, kernel=None, stride=None, dil
     """
     assert data is not None and weight is not None and kernel is not None, \
            "Missing input data, weight or kernel"
-    assert num_filter > 1, "Number of output filters should be greater than 1"
-    assert workspace > 0, "Maximum temporary workspace should be greater than 0"
+    assert num_filter >= 1, "Number of output filters should be greater equal to 1."
+    assert workspace >= 0, "Maximum temporary workspace should be greater equal to 0."
     if no_bias:
         assert bias is None, "Using no bias"
         return _api_internal.convolution(data, weight, kernel, stride, dilate, pad,
@@ -682,8 +682,8 @@ def deconvolution(data=None, weight=None, bias=None, kernel=None, stride=None, d
     """
     assert data is not None and weight is not None and kernel is not None, \
            "Missing input data, weight or kernel"
-    assert num_filter > 1, "Number of output filters should be greater than 1"
-    assert workspace > 0, "Maximum temporary workspace should be greater than 0"
+    assert num_filter >= 1, "Number of output filters should be greater equal to 1."
+    assert workspace >= 0, "Maximum temporary workspace should be greater equal to 0."
     if no_bias:
         assert bias is None, "Using no bias"
         return _api_internal.deconvolution(data, weight, kernel, stride, dilate, pad,