Giter Site home page Giter Site logo

natural-adversary's People

Contributors

ddua avatar zhengliz 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  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  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

natural-adversary's Issues

Is kenlm necessary

I found kenlm in the text code, but kenlm training will not be excuted with default parameters setting. Is kenlm training necessary for the generating fluent text?

Training encoder from deliminator loss?

Hi, thank you for sharing the code. I read your paper and I am trying to train and modify.
I have a question about how you optimize the encoder.
You are optimizing the encoder and the critic from the same loss at train_gan_d, but is this collect?
In my understanding, the encoder's loss function and the critic loss function are different.

2018-07-13-125133_715x69_scrot

Text: missing data labels

Hello there,

First, thanks for sharing your code!

I'm trying to run train_baseline for text but I'm getting this error:

Traceback (most recent call last):
  File "train_baseline.py", line 66, in <module>
    corpus_train = SNLIDataset(train=True, vocab_size=11004, lvt=False, path=args.data_path)
  File "/home/aosman/02_fields/adversarial/natural-adversary/text/utils.py", line 276, in __init__
    self.train_data = self.tokenize(self.train_path)
  File "/home/aosman/02_fields/adversarial/natural-adversary/text/utils.py", line 336, in tokenize
    label = self.labels[tokens[0]]
KeyError: 'A person on a horse jumps over a broken down airplane .'

it seems that the labels are missing from the text files (train.txt and test.txt). Would you be kind to provide them or let me know where to get them?

Thanks!

generate.py throwing issue

Hi zhengliz,

Thanks for sharing code.

just followed README.
i was trying see demo results. but couldn't get it as it's throwing issue.

$ python generate.py --load_path ./output/1535710044
{'ninterpolations': 5, 'temp': 1, 'load_path': './output/1535710044', 'sample': False, 'seed': 1111, 'steps': 5, 'noprint': False, 'outf': './generated.txt', 'ngenerations': 10}
Loading models from./output/1535710044/models
Traceback (most recent call last):
  File "generate.py", line 135, in <module>
    main(args)
  File "generate.py", line 74, in main
    maxlen=model_args['maxlen'])
  File "/natural-adversary/text/models.py", line 654, in generate
    sample=sample)
  File "/natural-adversary/text/models.py", line 303, in generate
    embedding = self.embedding_decoder(self.start_symbols)
  File "/venv/local/lib/python2.7/site-packages/torch/nn/modules/module.py", line 357, in __call__
    result = self.forward(*input, **kwargs)
  File "/venv/local/lib/python2.7/site-packages/torch/nn/modules/sparse.py", line 103, in forward
    self.scale_grad_by_freq, self.sparse
  File "/venv/local/lib/python2.7/site-packages/torch/nn/_functions/thnn/sparse.py", line 59, in forward
    output = torch.index_select(weight, 0, indices.view(-1))
TypeError: torch.index_select received an invalid combination of arguments - got (torch.cuda.FloatTensor, int, torch.LongTensor), but expected (torch.cuda.FloatTensor source, int dim, torch.cuda.LongTensor index)

could you please tell me why is this issue coming ?

thanks in advance.

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.