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_r212035069
##########
File path:
scala-package/examples/src/test/scala/org/apache/mxnetexamples/rnn/ExampleRNNSuite.scala
##########
@@ -50,26 +49,32 @@ class ExampleRNNSuite extends FunSuite with
BeforeAndAfterAll {
System.getenv("SCALA_TEST_ON_GPU").toInt == 1) {
ctx = Context.gpu()
}
- LstmBucketing.runTraining(tempDirPath + "/RNN/sherlockholmes.train.txt",
+ NDArrayCollector.auto().withScope {
+ LstmBucketing.runTraining(tempDirPath + "/RNN/sherlockholmes.train.txt",
Review comment:
@lanking520 Can you please make the change that Yizhi is asking? lets do it
right because this will become a pattern in other parts of the code.
----------------------------------------------------------------
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