Git Product home page Git Product logo

Comments (5)

heyoma avatar heyoma commented on May 30, 2024

I don't think there's something to do with the data I used. But I would one piece here.

{"clusters": [[]], "sentences": [["攀", "谈", "中", "我", "了", "解", "到", "衣", "裙", "出", "她", "的", "手", ",", "一", "针", "一", "线", "、", "一", "花", "一", "朵", "都", "是", "田", "边", "地", "角", "劳", "动", "之", "余", "飞", "针", "走", "线", "绣", "成", "的", "。"]], "ner": [[[7, 8, "Thing"], [10, 10, "Person"], [14, 22, "Thing"], [25, 28, "Location"]]], "relations": [[[10, 10, 7, 8, "Create"], [14, 22, 7, 8, "Part-Whole"]]], "doc_key": "dev.json_9"}

from pure.

heyoma avatar heyoma commented on May 30, 2024

Maybe the reason could be found in https://discuss.pytorch.org/t/solved-assertion-srcindex-srcselectdimsize-failed-on-gpu-for-torch-cat/1804/15. But I still have no idea~

from pure.

a3616001 avatar a3616001 commented on May 30, 2024

Hi! Have you tried to run our pre-trained models? I have never run into this issue before. I am wondering whether this is due to version mismatching of some libraries.

from pure.

heyoma avatar heyoma commented on May 30, 2024

Hi, thank you for your reply. I have just made out what had happened. It was because some of my instances are too long. I discarded the sentences over 512 (I don't know the exact number), and it worked.

from pure.

heyoma avatar heyoma commented on May 30, 2024

Hi, would you please modify the code of file run_relation_approx.py and make it more friendly to max_seq_length? Unlike those lines in run_relation.py, I found nothing was done for sequences with token number > max_seq_length.

In run_relation_approx.py

line 154: 
    assert(num_tokens + 4 <= max_seq_length)

In run_relation.py

line 114~119:
    if len(tokens) > max_seq_length:
        tokens = tokens[:max_seq_length]
        if sub_idx >= max_seq_length:
            sub_idx = 0
        if obj_idx >= max_seq_length:
            obj_idx = 0

from pure.

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.