Giter VIP home page Giter VIP logo

declare's People

Contributors

atulkumarin avatar mshalvagal 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

Watchers

 avatar  avatar  avatar  avatar

declare's Issues

Add a config file

  1. For model parameters
  2. Anything else if we want to run everything as a script

reproduce the result in the paper?

image
hello, I want to reproduce the result in the paper; as the picture show, train_loss and train_accuracy looks good, but val_acc mostly do not change.
any advisice?

Running DeClareDataset produces AttributeError

Expected Behavior

I am trying to run DeClarE using the DeClareMain.ipynb notebook in your repository.

Current Behavior

When it gets to the cell containing snopes = DeClareDataset(SNOPES_LOC, glove_data_file) I get the following error:


AttributeError Traceback (most recent call last)
in
----> 1 snopes = DeClareDataset(SNOPES_LOC, glove_data_file)

~/code/nlp_credibility/DeClare/data/datasets.py in init(self, news_dataset_path, glove_path)
35 self.vocab_vectors_path = os.path.join(os.path.dirname(news_dataset_path), 'vocab_vectors.npy')
36
---> 37 self._build_vocabulary()
38 self._build_source_vocabularies()
39

~/code/nlp_credibility/DeClare/data/datasets.py in _build_vocabulary(self)
76 self.vocab[word] = token_count
77 token_count += 1
---> 78 embeddings.append(self._vec(word))
79 else:
80 # Treat it as an unknown token

~/code/nlp_credibility/DeClare/data/datasets.py in _vec(self, w)
126
127 def _vec(self, w):
--> 128 return self.glove_df.loc[w].as_matrix()
129
130 def len(self):

~/miniconda/lib/python3.7/site-packages/pandas/core/generic.py in getattr(self, name)
5272 if self._info_axis._can_hold_identifiers_and_holds_name(name):
5273 return self[name]
-> 5274 return object.getattribute(self, name)
5275
5276 def setattr(self, name: str, value) -> None:

AttributeError: 'Series' object has no attribute 'as_matrix'


Possible Solution

I believe glove_df.loc is returning a _LocIndexer object which does not have an as_matrix() method. Could it be missing the method, or is self.glove_df.loc[w] supposed to return something different?

Steps to Reproduce

  1. Running in order, the 4th cell down produces this error.

vocabulary limited by tokens in training set

Although there will be no runtime issue due to the token in vocab, the model may not generalize well during inference. We can replace it with a universal vocab file (per-processced and fixed of appropriate size - some subset of GloVe vocabulary, taking the full Glove vocab will be memory intensive, so we can choose top frequent words on news sites).

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.