eric-wallace / adversarial-mt Goto Github PK
View Code? Open in Web Editor NEWCode for "Imitation Attacks and Defenses for Black-box Machine Translations Systems"
Home Page: http://www.ericswallace.com/imitation
License: MIT License
Code for "Imitation Attacks and Defenses for Black-box Machine Translations Systems"
Home Page: http://www.ericswallace.com/imitation
License: MIT License
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)
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.
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.