Giter VIP home page Giter VIP logo

neural-punctuator's People

Contributors

aetherprior avatar attilanagy234 avatar bana513 avatar dependabot[bot] avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

neural-punctuator's Issues

Return dict must be forced to false to ensure tensor return

In line 16 of src/neural_punctuator/models/BertPunctuator.py add return_dict=False to from_pretrained(), otherwise a dict is returned, from which your code takes the name of the layer, rather than the tensor.

(This will fix the bug with a traceback of dropout expecting a tensor rather than a string)

Random seed

  • create random seed
  • save with model for reproducibility

Running Error

Execuse me, when I train the model in GPU,I meet this error.Could you help me ?
Traceback (most recent call last):
File "main.py", line 6, in
pipe.train()
File "/workspace/neural-punctuator-main/src/neural_punctuator/wrappers/BertPunctuatorWrapper.py", line 17, in train
self._trainer.train()
File "/workspace/neural-punctuator-main/src/neural_punctuator/trainers/BertPunctuatorTrainer.py", line 106, in train
mask = ((targets == 0) & (np.random.rand(*targets.shape) < .1)) | (targets > 0)
TypeError: and() received an invalid combination of arguments - got (numpy.ndarray), but expected one of:

  • (Tensor other)
    didn't match because some of the arguments have invalid types: (numpy.ndarray)
  • (Number other)
    didn't match because some of the arguments have invalid types: (numpy.ndarray)

id2target and target2id

How did you decide id2target for converting back from prediction to original.
id2target = {-1: 0,
9: 1, # .
60: 2, # ?
15: 3, # ,
-2: -1, # will be masked
}

I have class 1 as , 2 as ? 3 as . and 4 as ! 0 for all others.
How should I use this?

Checking model output

Hi, I wanted to know if you have implemented to check the model output at test time. Because we had aligned labels according to tokens so model output would be according to that. How can we convert them back to original which was before aligning ?

Best Regards

Data set

Hello, can you share the data set of the experiment, the displayed network link can no longer be downloaded.Thanks!

Add punctuation in our own texts

Hello,

I'm kind of new with BERT etc, sorry in advance for the question, but how and where in the code sould I add my own texts, in order to have in the output my texts with the punctuation ?

Thanks,
Camille

Validation accuracy more than train

Hi, I am getting validation accuracy greater than training and validation loss lesser than train. Can you tell why? Maybe due to class imbalance? I am using different dataset

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.