szha closed pull request #9277: fix typo for assert messages in
gluon/nn/conv_layers.py
URL: https://github.com/apache/incubator-mxnet/pull/9277
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/python/mxnet/gluon/nn/conv_layers.py
b/python/mxnet/gluon/nn/conv_layers.py
index 645de98ec0..822a81cc6b 100644
--- a/python/mxnet/gluon/nn/conv_layers.py
+++ b/python/mxnet/gluon/nn/conv_layers.py
@@ -972,14 +972,15 @@ def __init__(self, layout='NCW', **kwargs):
class GlobalMaxPool2D(_Pooling):
"""Global max pooling operation for spatial data."""
def __init__(self, layout='NCHW', **kwargs):
- assert layout == 'NCHW', "Only supports NCW layout for now"
+ assert layout == 'NCHW', "Only supports NCHW layout for now"
super(GlobalMaxPool2D, self).__init__(
(1, 1), None, 0, True, True, 'max', **kwargs)
+
class GlobalMaxPool3D(_Pooling):
"""Global max pooling operation for 3D data."""
def __init__(self, layout='NCDHW', **kwargs):
- assert layout == 'NCDHW', "Only supports NCW layout for now"
+ assert layout == 'NCDHW', "Only supports NCDHW layout for now"
super(GlobalMaxPool3D, self).__init__(
(1, 1, 1), None, 0, True, True, 'max', **kwargs)
@@ -995,7 +996,7 @@ def __init__(self, layout='NCW', **kwargs):
class GlobalAvgPool2D(_Pooling):
"""Global average pooling operation for spatial data."""
def __init__(self, layout='NCHW', **kwargs):
- assert layout == 'NCHW', "Only supports NCW layout for now"
+ assert layout == 'NCHW', "Only supports NCHW layout for now"
super(GlobalAvgPool2D, self).__init__(
(1, 1), None, 0, True, True, 'avg', **kwargs)
@@ -1003,6 +1004,6 @@ def __init__(self, layout='NCHW', **kwargs):
class GlobalAvgPool3D(_Pooling):
"""Global max pooling operation for 3D data."""
def __init__(self, layout='NCDHW', **kwargs):
- assert layout == 'NCDHW', "Only supports NCW layout for now"
+ assert layout == 'NCDHW', "Only supports NCDHW layout for now"
super(GlobalAvgPool3D, self).__init__(
(1, 1, 1), None, 0, True, True, 'avg', **kwargs)
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services