1 Star 0 Fork 0

ssdreamC/CipherGAN

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

CipherGAN

搬运自 GitHub

实现了 CipherGAN,用于获取论文Unsupervised Cipher-Cracking Using Neural Networks 的详细结果.
作者: Aidan N. Gomez, Sīcōng Huang, Ivan Zhang, Bryan M. Li, Muhammad Osama, Łukasz Kaiser

引用该文章

@inproceedings{
    n.2018unsupervised,
    title={Unsupervised Cipher Cracking Using Discrete {GAN}s},
    author={Aidan N. Gomez and Sicong Huang and Ivan Zhang and Bryan M. Li and Muhammad Osama and Lukasz Kaiser},
    booktitle={International Conference on Learning Representations},
    year={2018},
    url={https://openreview.net/forum?id=BkeqO7x0-},
}

运行这份代码

命令 pip install -r CipherGAN/requirements.txt 来安装依赖项。

生成数据 generating data

我们使用数据生成器来生成用于训练的 TFRecords。 需要注意的是 cipher_generator, 它可以生成本论文中位移加密和维吉尼亚加密的数据。

We make use of data generators to generate the TFRecords that are used for training. Of particular note is cipher_generator, which may be used to generate data for the shift and Vigenère ciphers that were tested in the paper.

示例调用 Sample Call

包含的生成器的设置作为标志被传递。例如,要在样本长度为 200 的布朗语料库上生成单词级维吉尼亚密码(key:CDE),调用: The settings for the included generators are passed as flags. For example, to generate a word-level Vigenère Cipher (key:CDE) on the Brown Corpus with a sample length of 200, call:

python CipherGAN/data/data_generators/cipher_generator.py \
  --cipher=vigenere \
  --vigenere_key=345 \
  --percentage_training=0.9 \
  --corpus=brown \
  --vocab_size=200 \
  --test_name=vigenere345-brown200-eval \
  --train_name=vigenere345-brown200-train \
  --output_dir=tmp/data \
  --vocab_filename=vigenere345_brown200_vocab.txt

训练 Training

所有的训练可以通过调用 train.py 来执行。训练要求所含生成器生成的 TFRecords。 All training can be performed by calling train.py. Training requires the TFRecords generated by the included generators.

示例调用 Sample Call

请参考 train.py 接受的标志以获得完整的选项集。 Please refer to the flags accepted by train.py for a full set of options.

python -m CipherGAN.train \
  --output_dir=runs/vig345 \
  --test_name="vigenere345-brown200-eval*" \
  --train_name="vigenere345-brown200-train*" \
  --hparam_sets=vigenere_brown_vocab_200

贡献 Contributing

We'd love to accept your contributions to this project. Please feel free to open an issue, or submit a pull request as necessary. If you have implementations of this repository in other ML frameworks, please reach out so we may highlight them here.

致谢 Acknowledgements

Our thanks to Michal Wiszniewski for his assistance in developing this codebase.
In addition, this repository borrows and builds upon code from:

MIT License Copyright (c) 2017 FOR.ai Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

搬运自 GitHub, 实现 CipherGAN 展开 收起
Python
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/ssdreamc/CipherGAN.git
git@gitee.com:ssdreamc/CipherGAN.git
ssdreamc
CipherGAN
CipherGAN
master

搜索帮助

371d5123 14472233 46e8bd33 14472233