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/11/05 07:04:10 UTC

[GitHub] [incubator-mxnet] Light-- opened a new issue #19479: mxnet 1.7.0 src/executor/infer_graph_attr_pass.cc:675: Check failed: is >> rshape[out_ent_id] Invalid attribute

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


   ## Description
   constructed simple model, but throw out dmlc error
   
   ### Error Message
   ```
   terminate called after throwing an instance of 'dmlc::Error'
     what():  [08:14:10] src/executor/infer_graph_attr_pass.cc:675: Check failed: is >> rshape[out_ent_id] Invalid attribute
   ```
   ## To Reproduce
   run the minimal code example
   ### Steps to reproduce
   1. install mxnet-cu101 1.7.0
   2.run the code
   ```python
   def get_fc1(last_conv, num_classes, fc_type, input_channel=512):
       body = last_conv
   
       if fc_type == 'E':
           body = mx.sym.BatchNorm(data=body, fix_gamma=False, eps=2e-5, momentum=bn_mom, name='bn1')
           body = mx.symbol.Dropout(data=body, p=0.4)
   
           # output of backbone
           fc1 = mx.sym.FullyConnected(data=body, num_hidden=num_classes, name='pre_fc1')
           fc1 = mx.sym.BatchNorm(data=fc1, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fc1')
   
           ##################### add 3 tasks #####################################
           fcAge_weight = mx.sym.Variable("pre_fcAge_weight", lr_mult=10, shape=(num_classes, config.emb_size))
           fcAge = mx.sym.FullyConnected(data=body, weight=fcAge_weight, num_hidden=num_classes, name='pre_fcAge', no_bias=True)
           fcAge = mx.sym.BatchNorm(data=fcAge, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fcAge')
   
           fcGender_weight = mx.sym.Variable("pre_fcGen_weight", lr_mult=10, shape=(num_classes, config.emb_size))
           fcGender = mx.sym.FullyConnected(data=body, weight=fcGender_weight, num_hidden=num_classes, name='pre_fcGen', no_bias=True)
           fcGender = mx.sym.BatchNorm(data=fcGender, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fcGen')
   
           fcRace_weight = mx.sym.Variable("pre_fcRac_weight", lr_mult=10, shape=(num_classes, config.emb_size))
           fcRace = mx.sym.FullyConnected(data=body, weight=fcRace_weight, num_hidden=num_classes, name='pre_fcRac', no_bias=True)
           fcRace = mx.sym.BatchNorm(data=fcRace, fix_gamma=True, eps=2e-5, momentum=bn_mom, name='fcRac')
           print('Added 3 tasks')
           ##################### add 3 tasks #####################################
   
           print('Net built.')
           return mx.sym.Group([fc1, fcAge, fcGender, fcRace])
   if __name__ == '__main__':
       from mxnet import nd
       import numpy as np
       v_input = nd.random.normal(0, 1, shape=(3, 4))
       sym_input = mx.symbol.Variable('sym_input', shape=nd.empty((3,4)))
       c = get_fc1(last_conv=sym_input, num_classes=512, fc_type='E', input_channel=512)
   
       grad = mx.symbol.BlockGrad()
       loss = mx.sym.MakeLoss(grad+sym_input)
       exe = loss.simple_bind(ctx=mx.cpu(2), sym_input=v_input)
   ```
   
   ## What have you tried to solve it?
   
   1. this error has not reported before in mxnet-cu90 1.6.0
   2. [this solution](https://github.com/apache/incubator-mxnet/issues/7981) can not fix it, i didn't find any None shape definition for symbol
   
   ## 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>
   
   ```
   # Paste the diagnose.py command output here
   ```
   
   </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] szha commented on issue #19479: mxnet 1.7.0 src/executor/infer_graph_attr_pass.cc:675: Check failed: is >> rshape[out_ent_id] Invalid attribute

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


   @Light-- `simple_bind` takes the shape (not the data) of a symbol variable. The correct usage is
   ```
   executor = loss.simple_bind(ctx=cpu(), a=(1,2), b=(1,2))
   executor.forward(is_train=True, a=v1, b=v2)
   ```
   See [`Symbol.simple_bind`](https://mxnet.apache.org/versions/1.7.0/api/python/docs/api/symbol/symbol.html#mxnet.symbol.Symbol.simple_bind)


----------------------------------------------------------------
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] github-actions[bot] commented on issue #19479: mxnet 1.7.0 src/executor/infer_graph_attr_pass.cc:675: Check failed: is >> rshape[out_ent_id] Invalid attribute

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #19479:
URL: https://github.com/apache/incubator-mxnet/issues/19479#issuecomment-722186848


   Welcome to Apache MXNet (incubating)! We are on a mission to democratize AI, and we are glad that you are contributing to it by opening this issue.
   Please make sure to include all the relevant context, and one of the @apache/mxnet-committers will be here shortly.
   If you are interested in contributing to our project, let us know! Also, be sure to check out our guide on [contributing to MXNet](https://mxnet.apache.org/community/contribute) and our [development guides wiki](https://cwiki.apache.org/confluence/display/MXNET/Developments).


----------------------------------------------------------------
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 #19479: mxnet 1.7.0 src/executor/infer_graph_attr_pass.cc:675: Check failed: is >> rshape[out_ent_id] Invalid attribute

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


   


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