You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/02 07:57:56 UTC
[GitHub] huyangc commented on issue #8910: Possible Bug in Mxnet when training a Network with no labels
huyangc commented on issue #8910: Possible Bug in Mxnet when training a Network with no labels
URL: https://github.com/apache/incubator-mxnet/issues/8910#issuecomment-348675907
As you said, it is because of the dataiter to which provide label=[] when you don't provide any label to it.
Just refer to https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/io.py#L652,
https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/io.py#L684 and
https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/io.py#L707
To solve it, I think you can:
- write an DataIter to wrap the NDArrayIter, just to change the ``provide_label`` to return ``None``.
- Don't use the ``fit`` function, just bind the module, init_params and init_optimizer, and use forward, backward, update to train. When binding, let the ``label_shape`` to be ``None``.
More detail can refer to the code [here](https://github.com/apache/incubator-mxnet/blob/master/python/mxnet/module/module.py#L411-L429)
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services