-
Notifications
You must be signed in to change notification settings - Fork 1
/
NNVKeys.py
154 lines (120 loc) · 5.14 KB
/
NNVKeys.py
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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
template_owner_name_key = "owner"
template_project_name_key = "name"
template_root_node_name = "Root"
template_experiment_node_meta = "ExperimentIndex"
template_lec_node_meta = "LEC"
template_lec_node_model_blob ="model"
template_lec_exec_node_meta = "LECExec"
template_lec_exec_node_pointer = "LEC"
template_lec_file_name_key = "LEC_file_name"
template_NN_exec_node_meta = "NNModel"
template_NN_exec_node_pointer = "NN"
template_NN_node_base_meta = "NNType"
template_dataset_exec_node_meta = "DatasetSelect"
template_dataset_exec_node_pointer = "DD"
template_dataset_node_base_meta = "Dataset"
template_NN_CNN_key = "CNN"
template_NN_FFNN_key = "FFNN"
template_NN_NNCS_DiscreteLinear_key = "DiscreteLinearNNCS"
template_NN_NNCS_ContinuousLinear_key = "ContinuousLinearNNCS"
template_NN_NNCS_DiscreteNonLinear_key = "DiscreteNonLinearNNCS"
template_NN_NNCS_ContinuousNonLinear_key = "ContinuousNonLinearNNCS"
template_NN_node_valid_meta = {
template_NN_CNN_key ,
template_NN_FFNN_key,
template_NN_NNCS_DiscreteLinear_key,
template_NN_NNCS_ContinuousLinear_key,
template_NN_NNCS_DiscreteNonLinear_key,
template_NN_NNCS_ContinuousNonLinear_key
}
template_CNN_attack_key = "attack"
template_CNN_delta_key = "delta"
template_CNN_target_key = "im_target"
template_CNN_mean_key = "mean"
template_CNN_pixels_key = "pixels"
template_CNN_reachability_method_key = "reach-method"
template_CNN_std_delta_key = "std"
template_CNN_threshold_key = "threshold"
template_CNN_param_keys = {
template_CNN_attack_key,template_CNN_delta_key,template_CNN_target_key,template_CNN_mean_key,template_CNN_pixels_key,
template_CNN_reachability_method_key, template_CNN_std_delta_key,template_CNN_threshold_key
}
template_FFNN_halfspace_matrix_key = "HalfSpace-matrix"
template_FFNN_halfspace_vector_key = "HalfSpace-vector"
template_FFNN_lb_key= "lb"
template_FFNN_ub_key = "ub"
template_FFNN_reachability_key = "reach"
template_FFNN_verification_key = "verify"
template_FFNN_reachability_method_key = "reach-method"
template_FFNN_param_keys = {
template_FFNN_halfspace_matrix_key ,
template_FFNN_halfspace_vector_key,
template_FFNN_lb_key,
template_FFNN_ub_key ,
template_FFNN_reachability_key ,
template_FFNN_verification_key ,
template_FFNN_reachability_method_key
}
template_NNCS_halfspace_matrix_key = "HalfSpace-matrix"
template_NNCS_halfspace_vector_key = "HalfSpace-vector"
template_NNCS_lb_key = "lb"
template_NNCS_ub_key = "ub"
template_NNCS_reachability_key = "reach"
template_NNCS_cores_key = "cores"
template_NNCS_steps = "steps"
template_NNCS_lb_refinput_key = "lb-refInput"
template_NNCS_ub_refinput_key= "ub-refInput"
template_NNCS_verification_key = "verify"
template_NNCS_reach_method_key = "reach-method"
template_NNCS_param_keys = {
template_NNCS_halfspace_matrix_key,
template_NNCS_halfspace_vector_key ,
template_NNCS_lb_key,
template_NNCS_ub_key ,
template_NNCS_reachability_key,
template_NNCS_cores_key,
template_NNCS_steps,
template_NNCS_lb_refinput_key ,
template_NNCS_ub_refinput_key,
template_NNCS_verification_key,
template_NNCS_reach_method_key
}
template_NNCS_LinearSys_A_key = "A"
template_NNCS_LinearSys_B_key ="B"
template_NNCS_LinearSys_C_key ="C"
template_NNCS_LinearSys_D_key = "D"
template_NNCS_LinearSys_Ts_key = "Ts"
template_NNCS_LinearSys_Cont_reachable_steps_key = "reachable-steps"
template_NNCS_LinearSys_param_keys = template_NNCS_param_keys.union({
template_NNCS_LinearSys_A_key,
template_NNCS_LinearSys_B_key ,
template_NNCS_LinearSys_C_key ,
template_NNCS_LinearSys_D_key ,
template_NNCS_LinearSys_Ts_key ,
})
template_NNCS_LinearSys_Cont_param_keys = template_NNCS_LinearSys_param_keys.union({
template_NNCS_LinearSys_Cont_reachable_steps_key
})
template_NNCS_LinearSys_Discrete_param_keys = template_NNCS_LinearSys_param_keys
template_NNCS_NonLinearSys_filename_key = "file"
template_NNCS_NonLinearSys_func_key = "function"
template_NNCS_NonLinearSys_Cont_reachable_steps_key = "reachable-steps"
template_NNCS_NonLinearSys_param_keys = template_NNCS_param_keys.union({
template_NNCS_NonLinearSys_func_key,
template_NNCS_NonLinearSys_filename_key
})
template_NNCS_NonLinearSys_Discrete_param_keys = template_NNCS_NonLinearSys_param_keys
template_NNCS_NonLinearSys_Continuous_param_keys = template_NNCS_NonLinearSys_param_keys.union({template_NNCS_NonLinearSys_Cont_reachable_steps_key})
template_NN_param= {}
template_NN_param[template_NN_FFNN_key] = template_FFNN_param_keys
template_NN_param[template_NN_CNN_key] = template_CNN_param_keys
template_NN_param[template_NN_NNCS_ContinuousLinear_key] = template_NNCS_LinearSys_Cont_param_keys
template_NN_param[template_NN_NNCS_ContinuousNonLinear_key] = template_NNCS_NonLinearSys_Continuous_param_keys
template_NN_param[template_NN_NNCS_DiscreteLinear_key] = template_NNCS_LinearSys_Discrete_param_keys
template_NN_param[template_NN_NNCS_DiscreteNonLinear_key] = template_NNCS_NonLinearSys_Discrete_param_keys
template_parameter_file_name = "template_parameters.json"
output_directory_name = "/home/ubuntu/yogesh/nnv_data/inputs/"
upload_artifact_directory = "/home/ubuntu/yogesh/nnv_data/"
valid_meta_type_name_set = {
"ExperimentIndex",
}