You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2020/10/14 00:23:01 UTC
[incubator-mxnet] branch master updated: BUGFIX Fix ConvTranspose
__repr__ (#19338) (#19344)
This is an automated email from the ASF dual-hosted git repository.
zhasheng 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 94b649f BUGFIX Fix ConvTranspose __repr__ (#19338) (#19344)
94b649f is described below
commit 94b649fc599a3a85c8d3592b50f229cdf8da75fc
Author: Gilbert François <gi...@deep-impact.ch>
AuthorDate: Wed Oct 14 02:20:57 2020 +0200
BUGFIX Fix ConvTranspose __repr__ (#19338) (#19344)
* Fix the direction of in_channels -> out_channels in the repr function for ConvTranspose classes.
Co-authored-by: g4b1nagy <ga...@gmail.com>
Co-authored-by: g4b1nagy <ga...@gmail.com>
---
python/mxnet/gluon/nn/conv_layers.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/python/mxnet/gluon/nn/conv_layers.py b/python/mxnet/gluon/nn/conv_layers.py
index fd29327..f0cb940 100644
--- a/python/mxnet/gluon/nn/conv_layers.py
+++ b/python/mxnet/gluon/nn/conv_layers.py
@@ -170,8 +170,12 @@ class _Conv(HybridBlock):
s += ', {}'.format(self.act)
s += ')'
shape = self.weight.shape
+ if 'Transpose' in self.__class__.__name__:
+ mapping = '{1} -> {0}'
+ else:
+ mapping = '{0} -> {1}'
return s.format(name=self.__class__.__name__,
- mapping='{0} -> {1}'.format(shape[1] if shape[1] else None, shape[0]),
+ mapping=mapping.format(shape[1] if shape[1] else None, shape[0]),
**self._kwargs)