You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a custom operation with three result outputs. When I use Gradients.gradients to obtain the gradient with respect to the first of these outputs, the program crashes with a NullPointerException as the initial gradient for one of the other two outputs is null.
The gradient for this output is never used by my custom GradientFn, but since the change from GradientRegistry to GradientFn all output gradients are cast to their respective type in Op.scala line 1501, even if they are null (in which case a NullPointerException is thrown).
What I'm trying used to work with TensorFlow Scala 0.2.4 and works as intended if I compile TensorFlow Scala 0.4.2-SNAPSHOT after changing line 1501 in org/platanios/tensorflow/api/ops/Op.scala from
outputs.map(_.toOutput.asInstanceOf[Output[T]])
to
outputs.map(o => if (o == null) null else o.toOutput.asInstanceOf[Output[T]])
The text was updated successfully, but these errors were encountered:
I am using a custom operation with three result outputs. When I use
Gradients.gradients
to obtain the gradient with respect to the first of these outputs, the program crashes with a NullPointerException as the initial gradient for one of the other two outputs is null.The gradient for this output is never used by my custom
GradientFn
, but since the change fromGradientRegistry
toGradientFn
all output gradients are cast to their respective type inOp.scala
line 1501, even if they are null (in which case a NullPointerException is thrown).What I'm trying used to work with TensorFlow Scala 0.2.4 and works as intended if I compile TensorFlow Scala 0.4.2-SNAPSHOT after changing line 1501 in
org/platanios/tensorflow/api/ops/Op.scala
fromto
The text was updated successfully, but these errors were encountered: