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
{{ message }}
Repository navigation
NullPointerException when calling matrixDiagV3 #406
java.lang.NullPointerException
at org.tensorflow.EagerOperation.resolveTensorHandle(EagerOperation.java:193)
at org.tensorflow.EagerOperation.resolveTensor(EagerOperation.java:166)
at org.tensorflow.EagerOperation.tensor(EagerOperation.java:152)
at org.tensorflow.Output.asTensor(Output.java:97)
at org.tensorflow.Operand.asTensor(Operand.java:65)
The way I understand it is that the value parameter (the last one in you matrixDiagV3 call) must be a scalar and not a vector. This snippet works for me:
This is a pure guess but maybe they've changed something in the MatrixDiagV3 kernel of TensorFlow 2.7 that does not allow you anymore to pass a vector, and if it was allowed before I think that was a bug since according to the doc, that value should be "a number":
paddingValue – The number to fill the area outside the specified diagonal band with. Default is 0.
Activity
[-]NullPointerException when calling [/-][+]NullPointerException when calling matrixDiagV3[/+]karllessard commentedon Jan 13, 2022
Hi Frank,
The way I understand it is that the value parameter (the last one in you
matrixDiagV3call) must be a scalar and not a vector. This snippet works for me:Does that work for you too?
This is a pure guess but maybe they've changed something in the MatrixDiagV3 kernel of TensorFlow 2.7 that does not allow you anymore to pass a vector, and if it was allowed before I think that was a bug since according to the doc, that value should be "a number":
frankfliu commentedon Jan 13, 2022
@karllessard
You are absolutely correct, padding should be a scalar. I think earlier version didn't enforce that.
But the NPE is bug in the code. I will create a PR to address that.