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 2018/10/17 02:29:44 UTC

[GitHub] soeque1 opened a new issue #12844: ERROR parameter summary of lists layer

soeque1 opened a new issue #12844: ERROR parameter summary of lists layer
URL: https://github.com/apache/incubator-mxnet/issues/12844
 
 
   ## Description
   Error occurs when print_summary() related to lstm layer.
   
   ## Environment info (Required)
   
   ```
   MXNet 1.3.1
   
   Package used (Python/R/Scala/Julia):
   Python
   
   ```
   
   Package used (Python/R/Scala/Julia):
   (I'm using ...)
   
   ## Error Message:
   (Paste the complete error message, including stack trace.)
   ```
   IndexError                                Traceback (most recent call last)
   <ipython-input-5-d356a40b32a2> in <module>
         1 mx.viz.print_summary(
         2     model(mx.sym.var('data')),
   ----> 3     shape={'data':shape}
         4 )
   
   ~/python/venv/ngram_detectors/lib/python3.6/site-packages/mxnet/visualization.py in print_summary(symbol, shape, line_length, positions)
       186                 if key in shape_dict:
       187                     out_shape = shape_dict[key][1:]
   --> 188         total_params += print_layer_summary(nodes[i], out_shape)
       189         if i == len(nodes) - 1:
       190             print('=' * line_length)
   
   ~/python/venv/ngram_detectors/lib/python3.6/site-packages/mxnet/visualization.py in print_layer_summary(node, out_shape)
       132                         if key in shape_dict:
       133                             shape = shape_dict[key][1:]
   --> 134                             pre_filter = pre_filter + int(shape[0])
       135         cur_param = 0
       136         if op == 'Convolution':
   
   IndexError: tuple index out of range
   ```
   ## Minimum reproducible example
   ```
   import mxnet as mx
   model = mx.gluon.nn.HybridSequential()
   with model.name_scope():
       model.add(mx.gluon.nn.Embedding(30, 10))
       model.add(mx.gluon.rnn.LSTM(20))
       model.add(mx.gluon.nn.Dense(5, flatten=False))
   
   model.hybridize()
   shape = (2,3)
   mx.viz.print_summary(
       model(mx.sym.var('data')), 
       shape={'data':shape}
   )
   ```
   
   ## What have you tried to solve it?
   
   1. Add logic for lstm, RNN, and so on layers related to RNN
   2. Add Exception for error
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services