-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Increase amp support for Bi-lstm and Concat operators in gluon #15716
Comments
Hi @fierceX, do you have any small example that shows this problem? I will look into it. |
There seem to be 2 problems here. On 1 hand, the ConcatType function seems to be too strict in what it thinks it needs to be correct (and so that error should not be there in the first place as type could be inferred during later stage of InferType pass) - I will make a PR fixing that tomorrow. On the other hand, I don't quite see how you could end up with this situation by just adding AMP so again, a small example would be really nice. |
@mxnet-label-bot add [Pending Requester Info] |
Hi @ptrendx ,The following code should be able to reproduce this error. import mxnet as mx
from mxnet import nd
from mxnet.gluon import nn,rnn
from mxnet.contrib import amp
model = nn.HybridSequential()
model.add(rnn.LSTM(hidden_size=10,num_layers=2,bidirectional=True))
model.add(nn.Dense(2))
model.initialize()
model.hybridize()
model(nd.ones((2,3,4)))
new_model = amp.convert_hybrid_block(model) |
Thanks! I will look into this. |
thanks @ptrendx for looking at this. let me know if I can help here. |
Ok, so after applying PR #15740 I can successfully run the example when using
while the |
@ptrendx will take a look. |
Now amp does not support the bi-lstm and concat operators in gluon. I am getting the following error in converting a network with bi-lstm:
Hardware and version information:
The mxnet version is:
mxnet-cu100==1.6.0b20190730
,GPU is NVIDIA V100 16G.The text was updated successfully, but these errors were encountered: