You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2020/07/14 13:46:51 UTC

[GitHub] [incubator-mxnet] xidulu opened a new issue #18712: Auto-encoder example out of date

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


   CNN Autoencoder under the example folder is till using the "old" api:
   
   ```python
   1 net = gluon.nn.HybridSequential(prefix='autoencoder_')
        2 with net.name_scope():
         3     # Encoder 1x28x28 -> 32x1x1
         4     encoder = gluon.nn.HybridSequential(prefix='encoder_')
         5     with encoder.name_scope():
   ```
   which would cause:
   ```python
   TypeError: __init__() got an unexpected keyword argument 'prefix'
   ```
   when using the nightly version of MXNet.
   
   
   ## Reference
   https://github.com/apache/incubator-mxnet/blob/master/example/autoencoder/convolutional_autoencoder.ipynb


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] iadi7ya commented on issue #18712: Auto-encoder example out of date

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


   Hi @szha  Can I take this up?


----------------------------------------------------------------
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 #18712: Auto-encoder example out of date

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


   You don't need the `name_scope` anymore. You can just use
   
   ```
   encoder = gluon.nn.HybridSequential()
   encoder.add(
               gluon.nn.Conv2D(channels=4, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=8, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=16, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=32, kernel_size=3, padding=0, strides=(2,2),activation='relu'),
               gluon.nn.BatchNorm()
           )
   decoder = gluon.nn.HybridSequential()
   ```


----------------------------------------------------------------
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] iadi7ya commented on issue #18712: Auto-encoder example out of date

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


   Hi @szha  Can I take this up?


----------------------------------------------------------------
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] iadi7ya edited a comment on issue #18712: Auto-encoder example out of date

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


   Hi @xidulu 
   There is no argument named as `prefix` in the `HybridSequential` class written in file https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/gluon/nn/basic_layers.py
   
   The code in the Auto-encoder example should be changed to:
   
   ```net = gluon.nn.HybridSequential()
   with net.name_scope():
       # Encoder 1x28x28 -> 32x1x1
       encoder = gluon.nn.HybridSequential()
       with encoder.name_scope():
           encoder.add(
               gluon.nn.Conv2D(channels=4, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=8, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=16, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=32, kernel_size=3, padding=0, strides=(2,2),activation='relu'),
               gluon.nn.BatchNorm()
           )
       decoder = gluon.nn.HybridSequential()
   ```
   
   Am I doing it right?


----------------------------------------------------------------
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] iadi7ya commented on issue #18712: Auto-encoder example out of date

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


   Hi @leezu Thanks! I will make the required changes and open a pull request.


----------------------------------------------------------------
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] xidulu commented on issue #18712: Auto-encoder example out of date

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


   > Hi @szha  Can I take this up?
   
   You are more than welcome to fix this issue.


----------------------------------------------------------------
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] xidulu closed issue #18712: Auto-encoder example out of date

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


   


----------------------------------------------------------------
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 commented on issue #18712: Auto-encoder example out of date

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


   I think in addition to fixing the example, we need a mechanism to detect such problems. I started a discussion for managing examples in https://lists.apache.org/thread.html/rf0c95283d86cce60f98943f7d6e3387d6bad180a621bd939a1b2960f%40%3Cdev.mxnet.apache.org%3E


----------------------------------------------------------------
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



[GitHub] [incubator-mxnet] xidulu commented on issue #18712: Auto-encoder example out of date

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


   > Hi @szha  Can I take this up?
   
   You are more than welcome to fix this issue.


----------------------------------------------------------------
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] iadi7ya commented on issue #18712: Auto-encoder example out of date

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


   Hi @xidulu 
   There is no argument named as `prefix` in the 'HybridSequential' class written in file https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/gluon/nn/basic_layers.py
   
   The code in the Auto-encoder example should be changed to:
   
   ```net = gluon.nn.HybridSequential()
   with net.name_scope():
       # Encoder 1x28x28 -> 32x1x1
       encoder = gluon.nn.HybridSequential()
       with encoder.name_scope():
           encoder.add(
               gluon.nn.Conv2D(channels=4, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=8, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=16, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=32, kernel_size=3, padding=0, strides=(2,2),activation='relu'),
               gluon.nn.BatchNorm()
           )
       decoder = gluon.nn.HybridSequential()```
   
   Am I doing it right?


----------------------------------------------------------------
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] iadi7ya edited a comment on issue #18712: Auto-encoder example out of date

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


   Hi @xidulu 
   There is no argument named as `prefix` in the 'HybridSequential' class written in file https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/gluon/nn/basic_layers.py
   
   The code in the Auto-encoder example should be changed to:
   
   ```net = gluon.nn.HybridSequential()
   with net.name_scope():
       # Encoder 1x28x28 -> 32x1x1
       encoder = gluon.nn.HybridSequential()
       with encoder.name_scope():
           encoder.add(
               gluon.nn.Conv2D(channels=4, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=8, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=16, kernel_size=3, padding=1, strides=(2,2), activation='relu'),
               gluon.nn.BatchNorm(),
               gluon.nn.Conv2D(channels=32, kernel_size=3, padding=0, strides=(2,2),activation='relu'),
               gluon.nn.BatchNorm()
           )
       decoder = gluon.nn.HybridSequential()
   ```
   
   Am I doing it right?


----------------------------------------------------------------
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