VirtuslabRnD / scalapy-tensorflow

Static facades for using TensorFlow in ScalaPy
MIT License
3 stars 0 forks source link

Investigate potential optimization of creating the Tensors #30

Open Gryfit opened 4 years ago

Gryfit commented 4 years ago

As in Java API: https://github.com/tensorflow/tensorflow/issues/8244

PawelLipski commented 4 years ago

For the specific reason (not mentioned in tensorflow/tensorflow#8244) why Tensor#create(Object) is so slow:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/java/src/main/java/org/tensorflow/Tensor.java#L142

which points to recursion invoked in loop:

https://github.com/tensorflow/tensorflow/blob/master/tensorflow/java/src/main/java/org/tensorflow/Tensor.java#L759