You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/02/05 08:04:55 UTC

[GitHub] [incubator-mxnet] chinakook commented on issue #19574: symbol.tojson memory leak

chinakook commented on issue #19574:
URL: https://github.com/apache/incubator-mxnet/issues/19574#issuecomment-773867205


   > @chinakook Hi, do you happen to know how I can patch `FasterRCNNTrainBatchify` to resolve this (if that's possible)?
   ```
       def __getstate__(self):
           return self._num_shards, self._img_pad, self._label_pad, self.NUM_ELEMENTS, \
                   [x.tojson(remove_amp_cast=False) for x in self._feat_sym]
   
       def __setstate__(self, state):
           self._num_shards, self._img_pad, self._label_pad, self.NUM_ELEMENTS, json_strs = state
           self._feat_sym = tuple([mx.symbol.load_json(x) for x in json_strs])
   ```
   Adding the code into ```class FasterRCNNTrainBatchify``` can solve it.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@mxnet.apache.org
For additional commands, e-mail: issues-help@mxnet.apache.org