Debug error occurred in CRF: cannot be interpreted as a tensor.__ depth learning related

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.