forked from jkbestami/CryptoNN
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
67 lines (38 loc) · 2.06 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
An implementation of the neural network setup described in Abadi and Andersen's paper using Tensorflow and Tensorboard support.
The aim is to generate a cryptographic protocol by considering Alice, Bob and Eve as 3 neural networks
and training Alice and Bob against Eve adversarially.
Paper: Abadi, Martín, and David G. Andersen. "Learning to protect communications with adversarial neural cryptography." arXiv preprint arXiv:1610.06918 (2016).
Link: https://arxiv.org/abs/1610.06918
Before running make sure you install the required modules:
From a terminal on Linux run:
sudo pip install numpy
sudo pip install tensorflow
sudo pip install matplotlib
sudo pip install seaborn
###########################################################
Once the modules are installed
run from a terminal using:
python3 cryptoNN.py
###########################################################
You will then be prompted to enter the parameters.
To select the default values, leave blank and just press enter.
If you want all default parameters, press enter 5 times
###########################################################
If you want logging, you have to provide a directory to write onto
when prompted with :
logging file? (default: no logging)
if it doesn't exist it will be created
it's relative path so if you enter logging1, it will create a folder called 'logging1' wherever cryptoNN.py is
If you leave it blank and press enter, there will be no logging
CAUTION: for some reason, logging takes A LOT of RAM memory so make sure you allocate enough
#############################################################
To view logging information make sure to install Tensorboard
From a terminal in Linux run:
sudo pip install tensorflow
Then, (even while still training), open a new terminal and run:
tensorboard --logdir /path/to/logdir
It should launch a process at port:6006 (this can be changed, this is the default)
then open your webbrowser and type in the address bar:
localhost:6006
TensorBoard will show up with all its glory!
############################################################