GithubHelp home page GithubHelp logo

Comments (5)

kadruko avatar kadruko commented on September 4, 2024 1

@yy-mille
The method get_shape() on predictions returns , because shape was not yet initialized in this training phase.
Therefore ndims equals None.

To resolve this issue, you could choose a different version of tensorflow, but I could not find any version, that fits to the whole repository - other errors occured

The best solution is to manually initialize the shape of the predictions by setting the predictions shape to the number of inputs and label number:
token_label_predictions.set_shape([num_token_labels, num_labels])
This line of code needs to be placed at the begin of the definition of the metric_fn().

from laco.

yy-mille avatar yy-mille commented on September 4, 2024

以上是使用tf1.14存在的问题。tf1.13无experimental, tf1.12 cuda9目前无法使用。

from laco.

Sweetsmile123 avatar Sweetsmile123 commented on September 4, 2024

This error is reported at the end when I run the first program file "train_main_plcp.py".
Have you encountered the following errors when reproducing?

INFO:tensorflow:*** Features ***
INFO:tensorflow: name = fit_docspace_positions, shape = (?, 266)
INFO:tensorflow: name = fit_labelspace_positions, shape = (?, 54)
INFO:tensorflow: name = input_ids, shape = (?, 320)
INFO:tensorflow: name = input_mask, shape = (?, 320)
INFO:tensorflow: name = is_real_example, shape = (?,)
INFO:tensorflow: name = label_ids, shape = (?, 54)
INFO:tensorflow: name = pair, shape = (?, 2)
INFO:tensorflow: name = pair_target, shape = (?, 2)
INFO:tensorflow: name = segment_ids, shape = (?, 320)
INFO:tensorflow: name = token_label_ids, shape = (?, 320)

from laco.

EiraZhang avatar EiraZhang commented on September 4, 2024

Hi, I haven't encountered the similar problems. Please modify the code according to tf version.

from laco.

wuyw avatar wuyw commented on September 4, 2024

以上是使用tf1.14存在的问题。tf1.13无experimental, tf1.12 cuda9目前无法使用。

https://zhuanlan.zhihu.com/p/268735650

from laco.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.