mirror of
https://github.com/augustin64/projet-tipe
synced 2025-01-24 07:36:24 +01:00
Add exit(0)
This commit is contained in:
parent
45db00824c
commit
ed47283f5a
@ -136,7 +136,10 @@ def __main__():
|
|||||||
|
|
||||||
download_network()
|
download_network()
|
||||||
# train_shared s'appelle récursivement sur lui même jusqu'à la fin du programme
|
# train_shared s'appelle récursivement sur lui même jusqu'à la fin du programme
|
||||||
train_shared(dataset, start, nb_elem, epochs=1, out=DELTA)
|
try:
|
||||||
|
train_shared(dataset, start, nb_elem, epochs=1, out=DELTA)
|
||||||
|
except requests.exceptions.ConnectionError:
|
||||||
|
print("Host disconnected")
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
Description des structures.
|
Description des structures.
|
||||||
"""
|
"""
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import time
|
import time
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
@ -104,7 +103,7 @@ class Training:
|
|||||||
self.cur_image = 0
|
self.cur_image = 0
|
||||||
if self.cur_batch >= self.batchs:
|
if self.cur_batch >= self.batchs:
|
||||||
print("Done.")
|
print("Done.")
|
||||||
sys.exit()
|
os._exit(0)
|
||||||
|
|
||||||
|
|
||||||
def patch(self):
|
def patch(self):
|
||||||
@ -118,7 +117,7 @@ class Training:
|
|||||||
with open(self.reseau + ".lock", "w", encoding="utf8") as file:
|
with open(self.reseau + ".lock", "w", encoding="utf8") as file:
|
||||||
file.write("")
|
file.write("")
|
||||||
|
|
||||||
if not os.path.isfile("out/main"):
|
if not os.path.isfile("out/utils"):
|
||||||
subprocess.call(["./make.sh", "build", "utils"])
|
subprocess.call(["./make.sh", "build", "utils"])
|
||||||
subprocess.call(
|
subprocess.call(
|
||||||
[
|
[
|
||||||
|
Loading…
Reference in New Issue
Block a user