Git Product home page Git Product logo

Comments (5)

shaoerxixiao avatar shaoerxixiao commented on June 22, 2024

运行后还有这个问题:
Traceback (most recent call last):
File "/Volumes/Macintosh HHD/work/Bert_test/BERT-Classification-Tutorial/run_classifier.py", line 50, in
"bert_config_file", None + "bert_config.json",
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

from bert-classification-tutorial.

ejld avatar ejld commented on June 22, 2024

你好,
请问data数据集里为什么没有test.tsv?
最后的参数设置只需设置
flags.DEFINE_string(
"data_dir", None,
"The input data dir. Should contain the .tsv files (or other data files) "
"for the task.")
就可以了吗?
比如在你的项目下,把None改成'/data'吗?
最后运行run_classifier.py这个文件,是这样吗?
谢谢回复〜

你好,data里面是样本数据,dev就可以看出效果,可以在自己的数据集上面按dev 的格式制作test。DATA_DIR 是你的数据路径,具体可以看tutorial,里面每一步都有提到

from bert-classification-tutorial.

fip-lab avatar fip-lab commented on June 22, 2024

我也遇到了这个问题,报TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'的错误

from bert-classification-tutorial.

mushan09 avatar mushan09 commented on June 22, 2024

我也遇到了这个问题,报TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'的错误

我理解的作者的做法是希望能够不用再命令行里面输入很长的调用指令,但是我不清楚他为什么要None+"string"这种写法,在我的python2.7和python3.6均不支持这种语法。你可以直接用flags.DEFINE_string( "data_dir", "你的数据目录", "The input data dir. Should contain the .tsv files (or other data files) " "for the task.")

from bert-classification-tutorial.

ejld avatar ejld commented on June 22, 2024

我也遇到了这个问题,报TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'的错误

我理解的作者的做法是希望能够不用再命令行里面输入很长的调用指令,但是我不清楚他为什么要None+"string"这种写法,在我的python2.7和python3.6均不支持这种语法。你可以直接用flags.DEFINE_string( "data_dir", "你的数据目录", "The input data dir. Should contain the .tsv files (or other data files) " "for the task.")

运行后还有这个问题:
Traceback (most recent call last):
File "/Volumes/Macintosh HHD/work/Bert_test/BERT-Classification-Tutorial/run_classifier.py", line 50, in
"bert_config_file", None + "bert_config.json",
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

typo, 已经修复

from bert-classification-tutorial.

Related Issues (20)

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.