Code Monkey home page Code Monkey logo

Comments (11)

Roshanson avatar Roshanson commented on August 11, 2024 1

TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.

在 kiwi/metrics/functions.py:96 加上如下代码

    if not isinstance(hat_y, list):
        hat_y = hat_y.cpu()
    if not isinstance(y, list):
        y = y.cpu()

PicklingError: Can't pickle <class 'kiwi.data.encoders.wmt_qe_data_encoder.InputFields[PositiveInt]'>: attribute lookup InputFields[PositiveInt] on kiwi.data.encoders.wmt_qe_data_encoder failed

这个问题在使用多块GPU的时候我也遇到了。。 也不知道怎么改 = =

from openkiwi.

zhaofuchen avatar zhaofuchen commented on August 11, 2024

对齐文件是必须的,否则无法训练。你可以使用下面项目制作对齐文件:
https://github.com/Unbabel/word-level-qe-corpus-builder

from openkiwi.

leileilin avatar leileilin commented on August 11, 2024

from openkiwi.

zhaofuchen avatar zhaofuchen commented on August 11, 2024

训练和预测输入的数据是一样的,本质上预测就是使用已训练好的模型参数。
所以预测也需要对齐信息。

from openkiwi.

leileilin avatar leileilin commented on August 11, 2024

from openkiwi.

zhaofuchen avatar zhaofuchen commented on August 11, 2024

全部都需要,个人建议你别折腾nuqe了,这个模型效果没有其他的好。还有就是 estimator-predictor模型预训练官方有训练好的模型,不要自己训练。你找找看,我不记得了。
BERT,XLM,XLM-Roberta这三个模型是基于transformers实现的,目前效果比较好。

from openkiwi.

leileilin avatar leileilin commented on August 11, 2024

from openkiwi.

leileilin avatar leileilin commented on August 11, 2024

from openkiwi.

leileilin avatar leileilin commented on August 11, 2024

from openkiwi.

leileilin avatar leileilin commented on August 11, 2024

from openkiwi.

zhaofuchen avatar zhaofuchen commented on August 11, 2024

from openkiwi.

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.