mxnet icon indicating copy to clipboard operation
mxnet copied to clipboard

memory increasing during training

Open li-haoran opened this issue 10 years ago • 8 comments

when i train a model on GPU, the Memory is increasing. the dataiter i write following the fcn-xs

li-haoran avatar Jun 28 '16 08:06 li-haoran

@li-haoran Could you help provide a small example?

sxjscience avatar Jun 28 '16 10:06 sxjscience

https://github.com/li-haoran/mxnet/blob/master/example/pose/cpmdata.py here is my data iter https://github.com/li-haoran/mxnet/blob/master/example/pose/solver.py this is solver

li-haoran avatar Jun 29 '16 03:06 li-haoran

https://github.com/li-haoran/mxnet/blob/master/example/pose/solver.py#L80 you need to pass the initial executor as shared_mem here

piiswrong avatar Jun 29 '16 17:06 piiswrong

There is usually no need to write a solver now. Try mx.module.bucketing_module

piiswrong avatar Jun 29 '16 17:06 piiswrong

@piiswrong i change the executor as share_mem self.exector = self.symbol.bind(self.ctx, self.arg_params, args_grad=self.grad_params, grad_req=grad_req, aux_states=self.aux_params, shared_exec=exu) but the memory also increase each batch. i don't known why?but the speed is faster than before.

li-haoran avatar Jul 02 '16 09:07 li-haoran

have a look at the bucketing example

piiswrong avatar Jul 02 '16 09:07 piiswrong

.

mcxkarakoc avatar May 10 '17 15:05 mcxkarakoc

This issue is closed due to lack of activity in the last 90 days. Feel free to reopen if this is still an active issue. Thanks!

yajiedesign avatar Sep 30 '17 11:09 yajiedesign