About tf.matrix_inverse()
szxSpark opened this issue · 4 comments
Excuse me, do you meet the irreversibility of the matrix in neural.py line 87?It could cause error during the trainng time.
LL_inv = tf.matrix_inverse(LL) #batch_l, doc_l, doc_l
Hi Yang,
I got the following error at Line 87 of neural.py.
tensorflow.python.framework.errors_impl.InvalidArgumentError: Input is not invertible.
[[Node: MatrixInverse_1 = MatrixInverseT=DT_FLOAT, adjoint=false, _device="/job:localhost/replica:0/task:0/cpu:0"]]
Caused by op u'MatrixInverse_1', defined at :
File "/nfs/user/public/vbalacha/structured/neural.py", line 87, in _getMatrixTree
LL_inv = tf.matrix_inverse(LL) #batch_l, doc_l, doc_l
What's the fix for this?
Have you fixed it? I also meet this problem. @szxSpark @vidhishanair
@kscp123 No. this happens only when diagonal elements are 0, which happens only for some rare initializations. Sometimes restarting fixes it.