Giter Club home page Giter Club logo

Comments (9)

Xwmiss avatar Xwmiss commented on July 28, 2024

顺便问一下,我下载了readme中的文件,如下G2PWModel-v2.zip。但是该如何使用呢,在scripts/predict_g2p_bert.py的使用过程中,如下:
image
image
以上问题请问该如何解决。

from g2pw.

GitYCC avatar GitYCC commented on July 28, 2024

目前可下載的模型是基於繁體中文資料所訓練而成,其資料品質較好,而資料不開源。

而資料的格式採用和g2pM相同的格式,因此你可以自行使用g2pM訓練一個簡中模型,訓練方法如README所示。

from g2pw.

GitYCC avatar GitYCC commented on July 28, 2024

please refer: https://github.com/GitYCC/g2pW#load-offline-model

from g2pw.

Xwmiss avatar Xwmiss commented on July 28, 2024

please refer: https://github.com/GitYCC/g2pW#load-offline-model

感谢您的回复,我已明白了训练中的简体/繁体问题。但是,#load-offline-model中并没能解答我的困惑,G2PWConverter中传入的是onnx模型,而我想使用您所开源的pth模型,但是根据#predict,我却没办法直接使用您训练得到的pth权重

from g2pw.

Xwmiss avatar Xwmiss commented on July 28, 2024

please refer: https://github.com/GitYCC/g2pW#load-offline-model

感谢您的回复,我已明白了训练中的简体/繁体问题。但是,#load-offline-model中并没能解答我的困惑,G2PWConverter中传入的是onnx模型,而我想使用您所开源的pth模型,但是根据#predict,我却没办法直接使用您训练得到的pth权重

我想我有点明白了,您的意思是我可以不直接使用pth权重?
我看到了您开源代码中的g2pW/scripts/export_onnx_model.py,看来在训练以后,不选择pth而是直接将pth权重转为onnx进行调用?

from g2pw.

Xwmiss avatar Xwmiss commented on July 28, 2024

目前可下載的模型是基於繁體中文資料所訓練而成,其資料品質較好,而資料不開源。

而資料的格式採用和g2pM相同的格式,因此你可以自行使用g2pM訓練一個簡中模型,訓練方法如README所示。

我想再打扰您一下,训练所得到的模型是简中/繁中的设置是完全依赖于训练数据吗?也就是说如果我给的是简体的训练数据,出来的模型就是简中模型,若是繁中数据,得到的结果就是繁中模型?

此外,如果我想要的同样也是繁中模型,按照这个逻辑,我应该可以用opencc把简体中文的数据全部处理一遍来得到繁中数据,从而训练得到我所需要的繁中模型?

from g2pw.

GitYCC avatar GitYCC commented on July 28, 2024

你可以從pretrained model進行微調

from g2pw.

Xwmiss avatar Xwmiss commented on July 28, 2024

你可以從pretrained model進行微調

我是想尝试bert的结构做的小一些,所以无法使用pretrained model进行微调。

from g2pw.

Xwmiss avatar Xwmiss commented on July 28, 2024

你可以從pretrained model進行微調

我是想尝试bert的结构做的小一些,所以无法使用pretrained model进行微调。

目前看起来,如果我想要使用cpp数据集来训练得到一个类似的繁中模型,我需要使用opencc对cpp模型的文本进行处理,随后处理pinyin到bopomofo的转换,这样应该就可以训练得到对应的模型了。

from g2pw.

Related Issues (16)

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.