sgrvinod / a-pytorch-tutorial-to-sequence-labeling Goto Github PK
View Code? Open in Web Editor NEWEmpower Sequence Labeling with Task-Aware Neural Language Model | a PyTorch Tutorial to Sequence Labeling
License: MIT License
Empower Sequence Labeling with Task-Aware Neural Language Model | a PyTorch Tutorial to Sequence Labeling
License: MIT License
Hi,
Thanks for the great explanation.
I am wondering if I want to calculate partial CRF (http://aclweb.org/anthology/C18-1183)where we have some gold tag for some token and all possible tags for other tokens and it needs to calculate the following formula?
log_sum_ex (all socore) - log_sum_ex(partial score)
what would be the changes in the code?
Thanks
As of PyTorch 1.1.0, the inputs to pack_padded_sequence
do not need to be sorted by length if enforce_sorted=False
:
https://pytorch.org/docs/master/nn.html#torch.nn.utils.rnn.pack_padded_sequence
enforce_sorted (bool, optional) โ if True, the input is expected to contain sequences sorted by length in a decreasing order. If False, this condition is not checked. Default: True.
Thanks for the great tutorial!
Thank you for the tutorial, it is very easy to follow.
However, I am unable to replicate the results as mentioned in the tutorial.
I attempted to use the checkpoint for pertained model. The tag_map seems to not include all the tags. Is this on a different dataset?
In inference.py line 60, self.start_tag should be self.end_tag
in models.py line 184
:param cmap_lengths: character sequence lengths, a tensor of dimensions (batch_size, word_pad_len)
the shape of cmap_lengths should be (batch_size)?
Thanks for your code.
Could you please add a section for prediction using the trained weights ?
Getting the following error. Did someone face the same?
Embedding length is 100.
You have elected to include embeddings that are out-of-corpus.
Loading embeddings...
Traceback (most recent call last):
File "train.py", line 356, in <module>
main()
File "train.py", line 79, in main
expand_vocab) # load pre-trained embeddings
File "C:\Users\user\Desktop\NLP\a-PyTorch-Tutorial-to-Sequence-Labeling-master\utils.py", line 230, in load_embeddings
for line in open(emb_file, 'r', 'utf-8'):
TypeError: an integer is required (got type str)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.