Coder Social home page Coder Social logo

fursovia / paraphrase_tutorial Goto Github PK

View Code? Open in Web Editor NEW
4.0 2.0 4.0 13 KB

Materials for the RAAI Summer School 2019 workshop

Home Page: http://school-raai.org/

Jupyter Notebook 100.00%
nlp paraphrase-identification attention-mechanism attention pytorch-tutorial pytorch

paraphrase_tutorial's People

Contributors

fursovia avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

paraphrase_tutorial's Issues

Issue on running the ParaphraseDataset function

When I run the function ParaphraseDataset, got error (module 'Torchtext.vocab' has no attribute '_default_unk_index'). I am using Torchtext 0.4.0 and torch 1.2.0.

My understanding is that Torchtext version 0.4.0 the unk token isn’t hard coded, so I made a modification to the function as:
_#self.word2idx = defaultdict(torchtext.vocab.default_unk_index)
#self.word2idx.update(dict(self.text_field1.vocab.stoi))
self.word2idx = dict(self.text_field1.vocab.stoi)
self.word2idx.update(dict(self.text_field1.vocab.stoi))

I got this step run and got Vocabulary size = 10176. But when I ran the next step:
batch = next(iter(train_iter))

for batch in train_iter:
print(batch)
break
_

I got error as (KeyError: 'bharath'), and this word 'bharath' changes every time I run.

Thank you!

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.