You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/10/12 22:18:29 UTC

[GitHub] [incubator-mxnet] gilbertfrancois opened a new issue #19338: The print output of `mx.nn.Conv2dTranspose` shows the wrong direction of in and out channels.

gilbertfrancois opened a new issue #19338:
URL: https://github.com/apache/incubator-mxnet/issues/19338


   ## Description
   
   The print output of `mx.nn.Conv2dTranspose` shows the wrong direction of in and out channels. When e.g. defining:
   ```
   conv_t = mx.gluon.nn.Conv2DTranspose(in_channels=1, channels=2, kernel_size=3, strides=1)
   print(conv_t)
   ```
   it shows:
   ```
   Conv2DTranspose(2 -> 1, kernel_size=(3, 3), stride=(1, 1))
   ```
   However, I think it should be:
   ```
   Conv2DTranspose(1 -> 2, kernel_size=(3, 3), stride=(1, 1))
   ``` 
   
   When printing a summary, the output is correct and the layer works as expected. It is just a bit confusing when printing out a network to console for inspection and debugging.
   
   
   ## To Reproduce
   ```
   import mxnet as mx
   
   data = mx.nd.random.randn(1, 1, 8, 8)
   
   conv_t = mx.gluon.nn.Conv2DTranspose(in_channels=1, channels=2, kernel_size=3, strides=1)
   conv_t.initialize()
   
   print(conv_t)
   print("++++++++++++")
   print(conv_t.summary(data))
   ```
   
   output:
   ```
   Conv2DTranspose(2 -> 1, kernel_size=(3, 3), stride=(1, 1))
   ++++++++++++
   --------------------------------------------------------------------------------
           Layer (type)                                Output Shape         Param #
   ================================================================================
                  Input                                (1, 1, 8, 8)               0
      Conv2DTranspose-1                              (1, 2, 10, 10)              20
   ================================================================================
   Parameters in forward computation graph, duplicate included
      Total params: 20
      Trainable params: 20
      Non-trainable params: 0
   Shared params in forward computation graph: 0
   Unique parameters in model: 20
   --------------------------------------------------------------------------------
   None
   ```
   
   
   ## Environment
   
   ***We recommend using our script for collecting the diagnostic information with the following command***
   `curl --retry 10 -s https://raw.githubusercontent.com/apache/incubator-mxnet/master/tools/diagnose.py | python3`
   
   <details>
   <summary>Environment Information</summary>
   
   ```
   Architecture:        x86_64
   CPU op-mode(s):      32-bit, 64-bit
   Byte Order:          Little Endian
   CPU(s):              16
   On-line CPU(s) list: 0-15
   Thread(s) per core:  2
   Core(s) per socket:  8
   Socket(s):           1
   NUMA node(s):        1
   Vendor ID:           GenuineIntel
   CPU family:          6
   Model:               158
   Model name:          Intel(R) Core(TM) i9-9900K CPU @ 3.60GHz
   Stepping:            13
   CPU MHz:             1758.593
   CPU max MHz:         5000.0000
   CPU min MHz:         800.0000
   BogoMIPS:            7200.00
   Virtualization:      VT-x
   L1d cache:           32K
   L1i cache:           32K
   L2 cache:            256K
   L3 cache:            16384K
   NUMA node0 CPU(s):   0-15
   Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid mpx rdseed adx smap clflushopt intel_pt xsaveopt xsavec xgetbv1 xsaves dtherm ida arat pln pts hwp hwp_notify hwp_act_window hwp_epp md_clear flush_l1d arch_capabilities
   ----------Python Info----------
   Version      : 3.7.7
   Compiler     : GCC 7.5.0
   Build        : ('default', 'Sep  7 2020 12:08:56')
   Arch         : ('64bit', '')
   ------------Pip Info-----------
   Version      : 20.2.3
   Directory    : /home/ubuntu/.cache/pypoetry/virtualenvs/lab-SOISfXoO-py3.7/lib/python3.7/site-packages/pip
   ----------MXNet Info-----------
   Version      : 1.7.0
   Directory    : /home/ubuntu/.cache/pypoetry/virtualenvs/lab-SOISfXoO-py3.7/lib/python3.7/site-packages/mxnet
   Commit Hash   : 64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   64f737cdd59fe88d2c5b479f25d011c5156b6a8a
   Library      : ['/home/ubuntu/.cache/pypoetry/virtualenvs/lab-SOISfXoO-py3.7/lib/python3.7/site-packages/mxnet/libmxnet.so']
   Build features:
   ✔ CUDA
   ✔ CUDNN
   ✔ NCCL
   ✔ CUDA_RTC
   ✖ TENSORRT
   ✔ CPU_SSE
   ✔ CPU_SSE2
   ✔ CPU_SSE3
   ✔ CPU_SSE4_1
   ✔ CPU_SSE4_2
   ✖ CPU_SSE4A
   ✔ CPU_AVX
   ✖ CPU_AVX2
   ✔ OPENMP
   ✖ SSE
   ✔ F16C
   ✖ JEMALLOC
   ✔ BLAS_OPEN
   ✖ BLAS_ATLAS
   ✖ BLAS_MKL
   ✖ BLAS_APPLE
   ✔ LAPACK
   ✔ MKLDNN
   ✔ OPENCV
   ✖ CAFFE
   ✖ PROFILER
   ✔ DIST_KVSTORE
   ✖ CXX14
   ✖ INT64_TENSOR_SIZE
   ✔ SIGNAL_HANDLER
   ✖ DEBUG
   ✖ TVM_OP
   ----------System Info----------
   Platform     : Linux-5.4.0-47-generic-x86_64-with-debian-buster-sid
   system       : Linux
   node         : blackbox-1
   release      : 5.4.0-47-generic
   version      : #51~18.04.1-Ubuntu SMP Sat Sep 5 14:35:50 UTC 2020
   ----------Hardware Info----------
   machine      : x86_64
   processor    : x86_64
   ----------Network Test----------
   Setting timeout: 10
   Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0048 sec, LOAD: 0.6262 sec.
   Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0061 sec, LOAD: 0.1290 sec.
   Error open Gluon Tutorial(cn): https://zh.gluon.ai, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: certificate has expired (_ssl.c:1076)>, DNS finished in 0.0066070556640625 sec.
   Timing for FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, DNS: 0.0058 sec, LOAD: 0.2460 sec.
   Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0118 sec, LOAD: 0.4622 sec.
   Error open Conda: https://repo.continuum.io/pkgs/free/, HTTP Error 403: Forbidden, DNS finished in 0.013593912124633789 sec.
   ----------Environment----------
   MXNET_CPU_WORKER_NTHREADS="4"
   KMP_DUPLICATE_LIB_OK="True"
   KMP_INIT_AT_FORK="FALSE"
   
   ```
   
   </details>
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] gilbertfrancois commented on issue #19338: The print output of `mx.nn.Conv2dTranspose` shows the wrong direction of in and out channels.

Posted by GitBox <gi...@apache.org>.
gilbertfrancois commented on issue #19338:
URL: https://github.com/apache/incubator-mxnet/issues/19338#issuecomment-707661400


   We proposed a PR to fix the __repr__ function for ConvTranspose classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] szha closed issue #19338: The print output of `mx.nn.Conv2dTranspose` shows the wrong direction of in and out channels.

Posted by GitBox <gi...@apache.org>.
szha closed issue #19338:
URL: https://github.com/apache/incubator-mxnet/issues/19338


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] leezu commented on issue #19338: The print output of `mx.nn.Conv2dTranspose` shows the wrong direction of in and out channels.

Posted by GitBox <gi...@apache.org>.
leezu commented on issue #19338:
URL: https://github.com/apache/incubator-mxnet/issues/19338#issuecomment-707378679


   You can adapt https://github.com/apache/incubator-mxnet/blob/af2b4bcecfbf52df3a833974651eb75301d8f860/python/mxnet/gluon/nn/conv_layers.py#L156-L175 or overwrite the `__repr__` method of Conv2dTranspose class in the same file


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org


[GitHub] [incubator-mxnet] gilbertfrancois edited a comment on issue #19338: The print output of `mx.nn.Conv2dTranspose` shows the wrong direction of in and out channels.

Posted by GitBox <gi...@apache.org>.
gilbertfrancois edited a comment on issue #19338:
URL: https://github.com/apache/incubator-mxnet/issues/19338#issuecomment-707661400


   We proposed a PR to fix the __repr__ function for ConvTranspose classes and a small test.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org