Commit 232cf2cd authored by salbiach's avatar salbiach
Browse files

README updated and some minor code corrections

parent dd077c1f
......@@ -13,7 +13,7 @@ Or if you already have one you want to use:
`kubectl config use-context deephealth-bsc-context`
Prepare your image. Dockerfile is in docker folder. Execute Makefile in case you need to build and push to docker repository everytime.
Prepare your image. Dockerfile is in docker folder. Execute Makefile in case you need to build and push to docker repository everytime. Be aware that "PREFIX" in Makefile sohuld be changed accordingly to the repository you are using to obtain the image.
If you want to deploy k8s overriding existing one, first delete with command:
......@@ -33,3 +33,7 @@ You can also execute commands into pod's containers like this:
`kubectl exec -it **POD NAME** -- /bin/bash` (in case pod only has one container)
Both MNIST synchronous and asynchronous implementations are working correctly, calling by default the asynchronous one.
Other implementations can be found on the examples folder but further testing is required.
......@@ -81,7 +81,7 @@ def main(args):
# Model evaluation
import sys
p = net_parametersToNumpy(net.getParameters())
p = net_parametersToNumpy(eddl.get_parameters(net))
# print("Los final weights en main son estos: ", p)
print("Freq: ", getFreqFromParameters(p))
......
......@@ -92,7 +92,7 @@ def main(args):
# Model evaluation
import sys
p = net_parametersToNumpy(net.getParameters())
p = net_parametersToNumpy(eddl.get_parameters(net))
# print("Los final weights en main son estos: ", p)
epoch_end_time = timer()
......
......@@ -88,7 +88,7 @@ def main(args):
# Model evaluation
import sys
p = net_parametersToNumpy(net.getParameters())
p = net_parametersToNumpy(eddl.get_parameters(net))
#print("Los final weights en main son estos: ", p)
print("Freq: ", getFreqFromParameters(p))
......@@ -113,7 +113,7 @@ def main(args):
print("Elapsed time: ", final_time, " seconds")
# Model evaluation
#p = net_parametersToNumpy(net.getParameters())
#p = net_parametersToNumpy(eddl.get_parameters(net))
#print("Freq: ", getFreqFromParameters(p))
# Saving net
......@@ -121,11 +121,11 @@ def main(args):
#eddl.save_net_to_onnx_file(net, output_file)
#individualParamsSave(p, "async" + str(max_num_async_epochs) + ".txt")
#print("Evaluating model against train set")
#eddl.evaluate(net, [x_train], [y_train])
print("Evaluating model against train set")
eddl.evaluate(net, [x_train], [y_train])
#print("Evaluating model against test set")
#eddl.evaluate(net, [x_test], [y_test])
print("Evaluating model against test set")
eddl.evaluate(net, [x_test], [y_test])
if __name__ == "__main__":
......
......@@ -94,7 +94,7 @@ def main(args):
# Model evaluation
import sys
p = net_parametersToNumpy(net.getParameters())
p = net_parametersToNumpy(eddl.get_parameters(net))
# print("Los final weights en main son estos: ", p)
epoch_end_time = timer()
......@@ -121,7 +121,7 @@ def main(args):
print("Elapsed time: ", final_time, " seconds")
# Model evaluation
# p = net_parametersToNumpy(net.getParameters())
# p = net_parametersToNumpy(eddl.get_parameters(net))
# print("Freq: ", getFreqFromParameters(p))
# Saving net
......@@ -129,11 +129,11 @@ def main(args):
# eddl.save_net_to_onnx_file(net, output_file)
# individualParamsSave(p, "async" + str(max_num_async_epochs) + ".txt")
# print("Evaluating model against train set")
# eddl.evaluate(net, [x_train], [y_train])
print("Evaluating model against train set")
eddl.evaluate(net, [x_train], [y_train])
# print("Evaluating model against test set")
# eddl.evaluate(net, [x_test], [y_test])
print("Evaluating model against test set")
eddl.evaluate(net, [x_test], [y_test])
if __name__ == "__main__":
......
......@@ -85,7 +85,7 @@ def main(args):
print("Antes de: ")
sys.stdout.flush()
p = net.getParameters()
p = eddl.get_parameters(net)
print("despues ")
sys.stdout.flush()
......@@ -107,7 +107,7 @@ def main(args):
print("Elapsed time: ", final_time, " seconds")
# Model evaluation
#p = net_parametersToNumpy(net.getParameters())
#p = net_parametersToNumpy(eddl.get_parameters(net))
#print("Freq: ", getFreqFromParameters(p))
# Saving net
......
......@@ -90,7 +90,7 @@ def main(args):
print("Antes de: ")
sys.stdout.flush()
p = net.getParameters()
p = eddl.get_parameters(net)
print("despues ")
sys.stdout.flush()
......@@ -112,7 +112,7 @@ def main(args):
print("Elapsed time: ", final_time, " seconds")
# Model evaluation
#p = net_parametersToNumpy(net.getParameters())
#p = net_parametersToNumpy(eddl.get_parameters(net))
#print("Freq: ", getFreqFromParameters(p))
#individualParamsSave(p, "async" + str(max_num_async_epochs) + ".txt")
......
......@@ -78,12 +78,12 @@ def main(args):
print("Elapsed time: ", final_time, " seconds")
# Model evaluation
#p = net_parametersToNumpy(net.getParameters())
#p = net_parametersToNumpy(eddl.get_parameters(net))
#print("Freq: ", getFreqFromParameters(p))
individualParamsSave(p, "async" + str(max_num_async_epochs) + ".txt")
#individualParamsSave(p, "async" + str(max_num_async_epochs) + ".txt")
print("Evaluating model against train set")
#eddl.evaluate(net, [x_train], [y_train])
eddl.evaluate(net, [x_train], [y_train])
print("Evaluating model against test set")
eddl.evaluate(net, [x_test], [y_test])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment