GithubHelp home page GithubHelp logo

lm_ner_span's Introduction

Nice to meet U 👋

tree's GitHub stats

lm_ner_span's People

Contributors

wzzzd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lm_ner_span's Issues

DataManager.py中的DataManager:padding()里面的实现有点问题

DataManager.py中的DataManager:padding()里面的实现有点问题,如下:
src = [self.tokenizer.cls_token_id] + src + [self.tokenizer.pad_token_id]*pad_size + [self.tokenizer.sep_token_id]

[sep]应该是在[pad]的前面。这样会导致 attention_mask中的mask=1覆盖[pad]。从而在求loss的时候,会计算[pad]的损失。
@wzzzd @wzzzd

求解!!!

你这个把模型换成bert-large-uncased 可以训练英文的模型吗

Traceback (most recent call last): File "run.py", line 46, in <module> train_loader = dm.get_dataset(data_type='train') File "/user-data/lm_ner_span-main/DataManager.py", line 34, in get_dataset dataloader = self.data_process(file) File "/user-data/lm_ner_span-main/DataManager.py", line 68, in data_process sampler = RandomSampler(tokenized_datasets) if not torch.cuda.device_count() > 1 else DistributedSampler(tokenized_datasets) File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 103, in __init__ raise ValueError("num_samples should be a positive integer " ValueError: num_samples should be a positive integer value, but got num_samples=0

对抗学习参数问题

对抗学习中:emb_name='word_embeddings.' 这个代码,他的参数是怎么确定的?

Traceback (most recent call last): File "run.py", line 46, in <module> train_loader = dm.get_dataset(data_type='train') File "/user-data/lm_ner_span-main/DataManager.py", line 34, in get_dataset dataloader = self.data_process(file) File "/user-data/lm_ner_span-main/DataManager.py", line 68, in data_process sampler = RandomSampler(tokenized_datasets) if not torch.cuda.device_count() > 1 else DistributedSampler(tokenized_datasets) File "/opt/conda/lib/python3.8/site-packages/torch/utils/data/sampler.py", line 103, in __init__ raise ValueError("num_samples should be a positive integer " ValueError: num_samples should be a positive integer value, but got num_samples=0 请问这个报错怎么解决啊 好像是dataloader出错了 但是按照网上的解决办法将参数shuffle设置为FALSE还是没办法解决 请问大佬有什么解决办法吗

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.