Fixed error handling in train.py (#293)

Fixed the error handling in train.py so it doesn't swallow tracelogs.
This commit is contained in:
bryanlyon 2018-03-16 09:16:17 -07:00 committed by Clorr
parent db8324230b
commit 6ff64ef1c3

View File

@ -178,7 +178,7 @@ class TrainingProcessor(object):
print('Saving model weights has been cancelled!')
exit(0)
except Exception as e:
print(e)
raise e
exit(1)
def set_tf_allow_growth(self):
@ -200,4 +200,4 @@ class TrainingProcessor(object):
cv2.imwrite('_sample_{}.jpg'.format(name), image)
except Exception as e:
print("could not preview sample")
print(e)
raise e