nswamy commented on a change in pull request #12232: [MXNET-729] Scala Examples 
memory leak fix
URL: https://github.com/apache/incubator-mxnet/pull/12232#discussion_r212106238
 
 

 ##########
 File path: 
scala-package/examples/src/test/scala/org/apache/mxnetexamples/gan/GanExampleSuite.scala
 ##########
 @@ -44,7 +44,9 @@ class GanExampleSuite extends FunSuite with 
BeforeAndAfterAll{
 
         val context = Context.gpu()
 
-        val output = GanMnist.runTraining(modelDirPath, context, modelDirPath, 
5)
+        val output = NDArrayCollector.auto().withScope {
 
 Review comment:
   I don't think you need NDCollectors here. It should be sufficient to just 
have it inside the training loop(for each epoch)

----------------------------------------------------------------
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

Reply via email to