print error.txt

This commit is contained in:
josc146
2023-11-08 22:57:38 +08:00
parent 02ba37fab4
commit d249a4c29a
4 changed files with 4 additions and 0 deletions

View File

@@ -246,5 +246,6 @@ if __name__ == "__main__":
try:
main()
except Exception as e:
print(e)
with open("error.txt", "w") as f:
f.write(str(e))

View File

@@ -64,5 +64,6 @@ try:
torch.save(output_w, output)
except Exception as e:
print(e)
with open("error.txt", "w") as f:
f.write(str(e))