PyTorch reimplementation of neural-cryptography-tensorflow
Adversarial Neural Cryptography in PyTorch
A PyTorch implementation of Google Brain's paper (Learning to Protect Communications with Adversarial Neural Cryptography.)
Two Neural Networks, Alice and Bob learn to communicate secretly with each other, in presence of an adversary Eve.
PyTorch has a tiny little difference in convolution layer when compared with TensorFlow.
TF treats convolution input tensor as [batch_size, len, channels] while PyTorch way is [batch_size, channels, len]
- PyTorch
- Numpy
- Matplotlib
- Seaborn
First, ensure you have the dependencies installed.
$ pip install -r requirements.txt
To train the neural networks, run the main.py
script.
$ python main.py --msg-len 32 --epochs 50
- ankeshanand's implementation in TensorFlow neural-cryptography-tensorflow
MIT