Code Monkey home page Code Monkey logo

Comments (4)

Steffy-zxf avatar Steffy-zxf commented on May 18, 2024

感谢反馈!您上面提到的“其他任务”是什么任务呢?PaddleHub 文本分类demo中predict.py 用于预测的数据集是 所选数据集的dev部分的前3个数据。
https://github.com/PaddlePaddle/PaddleHub/blob/release/v1.1.0/demo/text-classification/predict.py#L153

from paddlehub.

YUTianGong avatar YUTianGong commented on May 18, 2024

就是用示例代码做其他数据的文本分类任务,在predict.py的第47行有“dataset = hub.dataset.ChnSentiCorp()”,这个“dataset”在自己的分类数据中是指什么数据呢?还是继续用“dataset = hub.dataset.ChnSentiCorp()”?

from paddlehub.

Steffy-zxf avatar Steffy-zxf commented on May 18, 2024

hub.dataset.ChnSentiCorp() 有三个部分:train,dev,test部分。文本分类demo中 predict.py中预测数据就是 这个数据集的dev部分前三个数据。如果您想替换为自定义数据,可以将自定义数据加载进来,直接用于预测,参考以下写法:
https://github.com/PaddlePaddle/PaddleHub/blob/release/v1.0.0/demo/text-classification/predict.py

如果想利用PaddleHub finetune自定义数据集做文本分类,可以参考
https://github.com/PaddlePaddle/PaddleHub/wiki/PaddleHub%E9%80%82%E9%85%8D%E8%87%AA%E5%AE%9A%E4%B9%89%E6%95%B0%E6%8D%AE%E5%AE%8C%E6%88%90FineTune

from paddlehub.

YUTianGong avatar YUTianGong commented on May 18, 2024

@Steffy-zxf 好的,谢谢你,我试试自定义的方法。

from paddlehub.

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.