Skip to content
Snippets Groups Projects
Commit 3159e3c8 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Improved naming of model state files

parent 6e330d11
No related branches found
No related tags found
No related merge requests found
......@@ -292,11 +292,18 @@ class NetworkTrainer(object):
def _init_state(self):
# file to save model state to
# format: networkname_datasetname_t(tilesize)_b(batchsize)_bands.pt
bformat = ''.join([b[0] for b in self.bands]) if self.bands else 'all'
self.state_file = ('{}_{}_t{}_b{}_{}.pt'
# format: network_dataset_seed_tilesize_batchsize_bands.pt
# get the band numbers
bformat = ''.join(band[0] +
str(self.dataset.sensor.__members__[band].value) for
band in self.bands)
# model state filename
self.state_file = ('{}_{}_s{}_t{}_b{}_{}.pt'
.format(self.model.__name__,
self.dataset.__class__.__name__,
self.seed,
self.tile_size,
self.batch_size,
bformat))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment