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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]