[50a3f7]: / modules / RESTAPI / asyncDemo / sampleServer.py

Download this file

37 lines (27 with data), 977 Bytes

 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
# this is the server
# views.py
model = getDNNClassifierModel() # Gets the DNNClassifierModel from wherever it is first created; from the origin of control flow
# And stores it as a global variable for future access to the same model object
class V1Arguments:
def argumentDecoder(args):
#Split args into:
# - activation
# - learningRate
# - regularzation
# - regRate
# - problemType
# Then update the values in the global DNNClassifierModel object
model.activationCallback(activation)
model.learningRateCallback(learningRate)
model.regularizationCallback(regularization)
model.regRateCallback(regRate)
model.problemTypeCallback(problemType)
return
def post():
args = None # collect args value here
argumentDecoder(args)
return
def get():
# send material from the arguments attribute, from the Network object within the global model object
model.network.getArguments() # a sample possible method in the Network class
return