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

Adjust model filenames.

parent 78456299
No related branches found
No related tags found
No related merge requests found
......@@ -158,26 +158,26 @@ if __name__ == '__main__':
for i in range(BOOTSTRAP):
# add suffix for n'th bootstrap
state_file = state_file.parent.joinpath(state_file.name.replace(
model = state_file.parent.joinpath(state_file.name.replace(
state_file.suffix, '_{}.pt'.format(i + 1)))
# check if target dataset already exists
target_ds = target.joinpath(state_file.name.replace(
state_file.suffix, '.nc'))
target_ds = target.joinpath(model.name.replace(
model.suffix, '.nc'))
if target_ds.exists() and not OVERWRITE:
LogConfig.init_log('{} already exists.'.format(target_ds))
continue
# load pretrained model
if state_file.exists() and not OVERWRITE:
if model.exists() and not OVERWRITE:
# load pretrained network
net, _ = Network.load_pretrained_model(state_file, NET)
net, _ = Network.load_pretrained_model(model, NET)
else:
# initialize network and optimizer
LogConfig.init_log('Initializing network and optimizer.')
# instanciate network
net = NET(state_file, inputs, outputs, filters=FILTERS)
net = NET(model, inputs, outputs, filters=FILTERS)
# initialize optimizer
optimizer = OPTIM(net.parameters(), **OPTIM_PARAMS)
......
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