reordering

This commit is contained in:
Starbeamrainbowlabs 2022-09-02 17:31:19 +01:00
parent b9d01ddadc
commit 389216b391
Signed by: sbrl
GPG key ID: 1BE5172E637709C2

View file

@ -28,8 +28,6 @@ class RainfallWaterContraster(object):
if filepath_checkpoint == None:
writefile(self.filepath_summary, "") # Empty the file ahead of time
self.model = self.make_model()
if self.dir_output == None:
raise Exception("Error: dir_output was not specified, and since no checkpoint was loaded training mode is activated.")
if not os.path.exists(self.dir_output):
@ -37,6 +35,9 @@ class RainfallWaterContraster(object):
self.filepath_summary = os.path.join(self.dir_output, "summary.txt")
writefile(self.filepath_summary, "") # Empty the file ahead of time
self.model = self.make_model()
summarywriter(self.model, self.filepath_summary, append=True)
writefile(os.path.join(self.dir_output, "params.json"), json.dumps(self.get_config()))
else: