eaplatanios / tensorflow_scala

TensorFlow API for the Scala Programming Language
http://platanios.org/tensorflow_scala/
Apache License 2.0
936 stars 96 forks source link

NullPointerException when using Tensor gather with default argument for axis #152

Closed Spiess closed 5 years ago

Spiess commented 5 years ago

When using the Tensor version of gather, providing no argument for axis, a NullPointerException is thrown.

Example:

val tensor = Tensor(1f, 2f, 3f, 4f, 5f)

tensor.gather(Tensor(4, 3, 2, 1, 0))

The problem most likely occurs because the Tensor version of gather (Basic.scala line 1297) does not differentiate between null and proper axis values like the Output version does (Manipulation.scala line 1412).

eaplatanios commented 5 years ago

Are you using the master branch or the latest release version? Because I believe this has been fixed on master, but not released yet.

Spiess commented 5 years ago

No sorry, I only tested the latest release and the master branch version from late January. I'll try to test with the most recent version of the master branch first, before I open an issue in the future.

eaplatanios commented 5 years ago

I'll close this for now. Please re-open if the issue persists with the master branch version.