Update app.py
Browse files
app.py
CHANGED
@@ -25,9 +25,9 @@ VERBOSE = 1
|
|
25 |
# This function loads a fuckton of data
|
26 |
def load_data():
|
27 |
# Open all the files we downloaded at the beginning and take out hte good bits
|
28 |
-
curves = numpy.load('
|
29 |
-
geometry = numpy.load('
|
30 |
-
constants = numpy.load('
|
31 |
S = constants['S']
|
32 |
N = constants['N']
|
33 |
D = constants['D']
|
@@ -158,11 +158,11 @@ class Network(object):
|
|
158 |
return table
|
159 |
|
160 |
def simple_analysis(index):
|
161 |
-
net = Network("
|
162 |
return net.analysis(index)
|
163 |
|
164 |
def simple_synthesis(index):
|
165 |
-
net = Network("
|
166 |
pred, true = net.synthesis(index)
|
167 |
return plotly_fig(pred), plotly_fig(true)
|
168 |
|
@@ -170,11 +170,11 @@ import plotly.graph_objects as go
|
|
170 |
import numpy as np
|
171 |
|
172 |
def performance(index):
|
173 |
-
net = Network("
|
174 |
return net.get_performance(index)
|
175 |
|
176 |
def geometry(index):
|
177 |
-
net = Network("
|
178 |
values = net.get_geometry(index)
|
179 |
return plotly_fig(values)
|
180 |
|
|
|
25 |
# This function loads a fuckton of data
|
26 |
def load_data():
|
27 |
# Open all the files we downloaded at the beginning and take out hte good bits
|
28 |
+
curves = numpy.load('data_curves.npz')['curves']
|
29 |
+
geometry = numpy.load('data_geometry.npz')['geometry']
|
30 |
+
constants = numpy.load('constants.npz')
|
31 |
S = constants['S']
|
32 |
N = constants['N']
|
33 |
D = constants['D']
|
|
|
158 |
return table
|
159 |
|
160 |
def simple_analysis(index):
|
161 |
+
net = Network("16forward_structure.json", "16forward_weights.h5")
|
162 |
return net.analysis(index)
|
163 |
|
164 |
def simple_synthesis(index):
|
165 |
+
net = Network("16inverse_structure.json", "16inverse_weights.h5")
|
166 |
pred, true = net.synthesis(index)
|
167 |
return plotly_fig(pred), plotly_fig(true)
|
168 |
|
|
|
170 |
import numpy as np
|
171 |
|
172 |
def performance(index):
|
173 |
+
net = Network("16forward_structure.json", "16forward_weights.h5")
|
174 |
return net.get_performance(index)
|
175 |
|
176 |
def geometry(index):
|
177 |
+
net = Network("16forward_structure.json", "16forward_weights.h5")
|
178 |
values = net.get_geometry(index)
|
179 |
return plotly_fig(values)
|
180 |
|