Incubator-mxnet: How to get the symbol of gluon's RNN model by hybridizing

Created on 22 Aug 2017  路  9Comments  路  Source: apache/incubator-mxnet

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 . If you are using Sequential, please try HybridSequential instead.
I can not find the HybridSequential RNN in source code of gluon

Feature request Gluon

Most helpful comment

@piiswrong Is this feature available now?

All 9 comments

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 Any ETA for this feature?

@piiswrong Is this feature available now?

looking forward to this new feature

same here. thanks!

same here.

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

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

yuconglin picture yuconglin  路  3Comments

ranti-iitg picture ranti-iitg  路  3Comments

sbodenstein picture sbodenstein  路  3Comments

dushoufu picture dushoufu  路  3Comments

Shiro-LK picture Shiro-LK  路  3Comments