Giter Club home page Giter Club logo

adversarial-mt's People

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

Watchers

 avatar  avatar  avatar

adversarial-mt's Issues

RuntimeError: result type Float can't be cast to the desired output type Long

Hi I was trying out to setup the github repo codes. I followed the entire setup process but I encountered this error:
I have installed the requirements.txt file before this and run through the process.
Is it possible to provide the full requirements.txt file with the versions of the dependencies inside? The current one only has the package but not the versions. Appreciate your time! Thank you!

RuntimeError: result type Float can't be cast to the desired output type Long

Full error log as follows:
Traceback (most recent call last):
File "targeted_flips.py", line 160, in
main()
File "targeted_flips.py", line 32, in main
targeted_flips(samples, args, trainer, generator, embedding_weight, bpe)
File "targeted_flips.py", line 46, in targeted_flips
translations = trainer.task.inference_step(generator, [trainer.get_model()], samples)
File "/data/home/boonghim/adversarial-mt-master/fairseq/tasks/fairseq_task.py", line 265, in inference_step
return generator.generate(models, sample, prefix_tokens=prefix_tokens)
File "/data/home/boonghim/.conda/envs/attacking/lib/python3.6/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
return func(*args, **kwargs)
File "/data/home/boonghim/adversarial-mt-master/fairseq/sequence_generator.py", line 113, in generate
return self._generate(model, sample, **kwargs)
File "/data/home/boonghim/.conda/envs/attacking/lib/python3.6/site-packages/torch/autograd/grad_mode.py", line 26, in decorate_context
return func(*args, **kwargs)
File "/data/home/boonghim/adversarial-mt-master/fairseq/sequence_generator.py", line 379, in _generate
scores.view(bsz, beam_size, -1)[:, :, :step],
File "/data/home/boonghim/adversarial-mt-master/fairseq/search.py", line 83, in step
out=self.beams_buf)

Automated Switch of Multiple Sentence

Hi Eric,

Just here to ask if the project can run automatically on multiple sentences. Like, we have an input of tens of sentences, and the project can do the flip on all sentences without inputting sentences one by one?

Thank you for your kind answer 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.