Add exit(0)

This commit is contained in:
augustin64 2022-05-21 19:00:13 +02:00
parent 45db00824c
commit ed47283f5a
2 changed files with 6 additions and 4 deletions

View File

@ -136,7 +136,10 @@ def __main__():
download_network()
# train_shared s'appelle récursivement sur lui même jusqu'à la fin du programme
try:
train_shared(dataset, start, nb_elem, epochs=1, out=DELTA)
except requests.exceptions.ConnectionError:
print("Host disconnected")
if __name__ == "__main__":

View File

@ -3,7 +3,6 @@
Description des structures.
"""
import os
import sys
import time
import subprocess
@ -104,7 +103,7 @@ class Training:
self.cur_image = 0
if self.cur_batch >= self.batchs:
print("Done.")
sys.exit()
os._exit(0)
def patch(self):
@ -118,7 +117,7 @@ class Training:
with open(self.reseau + ".lock", "w", encoding="utf8") as file:
file.write("")
if not os.path.isfile("out/main"):
if not os.path.isfile("out/utils"):
subprocess.call(["./make.sh", "build", "utils"])
subprocess.call(
[