-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
116 lines (103 loc) · 3.13 KB
/
readme.txt
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
This program is attempt to adapt NPI (Neural Program Interpreter https://arxiv.org/pdf/1511.06279.pdf) implementation. The codes for the projects were adapted and made needed changes from the https://github.com/siddk/npi
Package required:
* Tensorflow
* Tflearn
* Numpy (if not already installed)
* Pickle (if not already installed)
You can use NPI_Country_Region.ipynb file and having all other files in the same folder except for the separate folder for model named as model.
The cells header of the .ipynb file explains the use of the cell i.e. generate data, train, plot, evaluate or test.
Alternatively, the files description can be as follows:
create_program_data -> for creating the trace of the data
train.py -> for training the data
eval.py -> for testing or evaluating of the data on randomly picked data
Note that to continue press “c” while running the eval.py or testing/evaluation cell in .ipynb file.
Example of trace from the cell would be:
To find: Angola
-------- Environment ----------
> Angola None
> Nepal Asia
> India Asia
> China Asia
> Peru North America
> Brazil North America
> UK Europe
> Sudan Africa
> Italy Europe
> Sweden Europe
> Mexico North America
> USA North America
> Angola Africa
> Bangladesh Asia
> Japan Asia
> Egypt Africa
> Nigeria Africa
> None None
-----------------------------------
Step: FIND, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Continue? c
Step: INCREMENT, Arguments: [], Terminate: False
Step: INCREMENT, Arguments: [], Terminate: True
> Angola None
> Nepal Asia
> India Asia
> China Asia
> Peru North America
> Brazil North America
> UK Europe
> Sudan Africa
> Italy Europe
> Sweden Europe
> Mexico North America
> USA North America
> Angola Africa
> Bangladesh Asia
> Japan Asia
> Egypt Africa
> Nigeria Africa
> None None
Pointer at 12
-------- KB Environment ----------
> Angola None
> Nepal Asia
> India Asia
> China Asia
> Peru North America
> Brazil North America
> UK Europe
> Sudan Africa
> Italy Europe
> Sweden Europe
> Mexico North America
> USA North America
> Angola Africa
> Bangladesh Asia
> Japan Asia
> Egypt Africa
> Nigeria Africa
> Africa None
--------------------------------------------------------------------------
Model Output: Africa
Correct Out : Africa
Correct!