zachgk commented on a change in pull request #12690: [MXNET-1000] get Ndarray 
real value and form it from a NDArray
URL: https://github.com/apache/incubator-mxnet/pull/12690#discussion_r248080616
 
 

 ##########
 File path: scala-package/core/src/main/scala/org/apache/mxnet/NDArray.scala
 ##########
 @@ -694,6 +745,12 @@ class NDArray private[mxnet](private[mxnet] val handle: 
NDArrayHandle,
   // we use weak reference to prevent gc blocking
   private[mxnet] val dependencies = mutable.HashMap.empty[Long, 
WeakReference[NDArray]]
 
+  private val traceProperty = "mxnet.setNDArrayPrintLength"
+  private lazy val printLength = {
+    val value = Try(System.getProperty(traceProperty).toInt).getOrElse(1000)
 
 Review comment:
   Do you need the intermediate val value or can this be just a single line?

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