mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

How to get the symbol of gluon's RNN model by hybridizing

Open everwind opened this issue 9 years ago • 9 comments

I follow the instruction of http://gluon.mxnet.io/P14-C05-hybridize.html#, but fail. the error message is: File "/usr/lib/python2.7/site-packages/mxnet-0.11.0-py2.7.egg/mxnet/gluon/block.py", line 312, in setattr super(HybridBlock, self).setattr(name, value) File "/usr/lib/python2.7/site-packages/mxnet-0.11.0-py2.7.egg/mxnet/gluon/block.py", line 177, in setattr self.register_child(value) File "/usr/lib/python2.7/site-packages/mxnet-0.11.0-py2.7.egg/mxnet/gluon/block.py", line 327, in register_child str(block), str(type(block)))) ValueError: Children of HybridBlock must also be HybridBlock, but RNN(100 -> 100, TNC, num_layers=2, dropout=0.2) has type <class 'mxnet.gluon.rnn.rnn_layer.RNN'>. If you are using Sequential, please try HybridSequential instead. I can not find the HybridSequential RNN in source code of gluon

everwind avatar Aug 22 '17 01:08 everwind

RNN is not a HybridBlock so you cannot use it as a children of a HybridBlock.

This is currently a limitation due to sym.RNN doesn't support CPU. RNN will be changed to a hybridblock in the future.

piiswrong avatar Aug 22 '17 06:08 piiswrong

@piiswrong Any ETA for this feature?

dmas-at-wiris avatar Nov 08 '17 10:11 dmas-at-wiris

@piiswrong Is this feature available now?

aodhan-domhnaill avatar Jan 20 '18 00:01 aodhan-domhnaill

looking forward to this new feature

Matafight avatar Jan 20 '18 08:01 Matafight

same here. thanks!

sontran avatar Mar 20 '18 23:03 sontran

same here.

xylcbd avatar Apr 24 '18 09:04 xylcbd

is it still a limitation yet? Can someone post a workaround?

QiXuanWang avatar May 04 '18 06:05 QiXuanWang

This request is tracked in #10873. The overall project is tracked in https://github.com/apache/incubator-mxnet/projects/11

szha avatar May 09 '18 18:05 szha

Resolving it since it is now supported - https://github.com/apache/incubator-mxnet/pull/11482

sandeep-krishnamurthy avatar Aug 17 '18 18:08 sandeep-krishnamurthy