Naveen Swamy created MXNET-1171:
-----------------------------------
Summary: Refactor and Fix Memory Leak in FeedForward.scala
Key: MXNET-1171
URL: https://issues.apache.org/jira/browse/MXNET-1171
Project: Apache MXNet
Issue Type: Bug
Components: Apache MXNet Scala API
Reporter: Naveen Swamy
There is an active memory leak in FeedForward.scala's fit method, the public
fit methods call initSymbolParams which in turn calls initParams, initParams
allocates NDArrays for _argParams and _auxParams which get overwritten inside
the private fit method.
I have added TODO to fix this issue, creating this JIRA to move on to my story.
Note that since the ND loses references, PhantomRef should pick up and clean
when GC runs.
// TODO: this leaks memory, initSymbolParams->initParams is already called
which allocates
// NDArray in argParams, auxParams and here we are overwriting it by calling
again.
val (argNames, paramNames, auxNames) = initSymbolParams(trainData)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]