CRF Reference code: HTTPS://GITHUB.COM/TENSORFLOW/TENSORFLOW/TREE/MASTER/TENSORFLOW/CONTRIB/CRF
The following error occurred in debugging the CRF code with TensorFlow:
Valueerror:fetch argument <TF. Tensor ' reversesequence_1:0 ' shape= (m) dtype=int32> cannot be interpreted as a Tensor. (Tensor Tensor ("reversesequence_1:0", Shape= (a), dtype=int32) is not a element of this graph.)
Refer to the workaround:
Https://stackoverflow.com/questions/44299638/fetch-argument-tf-tensor-batch0-shape-128-56-56-3-dtype-float32-cannot
Use Tensorflow.constant to create constants, such as:
A = Tf.constant (2, tf.int16)
B = tf.constant (4, Tf.float32)
The following error occurs when using tensor A and B.
This is because when using constants, reuse:
With TF. Graph (). As_default ():
Will cause the two created graphs to be inconsistent. Causes the above error to occur.
Put the words in the code and then comment out.