szha commented on issue #12783: Name conflict when serializing LSTMCell URL: https://github.com/apache/incubator-mxnet/issues/12783#issuecomment-429086305 The problem is in the sample code. Since HybridSequentialRNNCell is a container block, you need to use its name_scope if you intend to properly export it as a symbol. ``` class MyBlock(mx.gluon.HybridBlock): def __init__(self): super().__init__() with self.name_scope(): self.lstm = mx.gluon.rnn.HybridSequentialRNNCell() with self.lstm.name_scope(): for layer in range(3): self.lstm.add(mx.gluon.rnn.LSTMCell(hidden_size=20)) def hybrid_forward(self, F, seq): outputs, state = self.lstm.unroll(inputs=seq, length=10, layout="NTC", merge_outputs=True) return outputs ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
