|
|
|
@ -49,18 +49,18 @@ class ValOptions():
|
|
|
|
|
|
|
|
|
|
return args
|
|
|
|
|
|
|
|
|
|
def print_options(self, opt):
|
|
|
|
|
def __repr__(self):
|
|
|
|
|
config = self.parser.parse_args()
|
|
|
|
|
message = ''
|
|
|
|
|
message += '----------------- Options ---------------\n'
|
|
|
|
|
for k, v in sorted(vars(opt).items()):
|
|
|
|
|
for k, v in sorted(vars(config).items()):
|
|
|
|
|
comment = ''
|
|
|
|
|
default = self.parser.get_default(k)
|
|
|
|
|
if v != default:
|
|
|
|
|
comment = '\t[default: %s]' % str(default)
|
|
|
|
|
message += '{:>25}: {:<30}{}\n'.format(str(k), str(v), comment)
|
|
|
|
|
message += '----------------- End -------------------'
|
|
|
|
|
print(message)
|
|
|
|
|
print()
|
|
|
|
|
return message
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# TODO with unified save/load function any model file of net or lut can be tested with the same script.
|
|
|
|
@ -69,7 +69,7 @@ if __name__ == "__main__":
|
|
|
|
|
config_inst = ValOptions()
|
|
|
|
|
config = config_inst.parse_args()
|
|
|
|
|
|
|
|
|
|
config.logger.info(config_inst.print_options(config))
|
|
|
|
|
config.logger.info(config_inst)
|
|
|
|
|
|
|
|
|
|
model = LoadCheckpoint(config.model_path)
|
|
|
|
|
model = model.cuda()
|
|
|
|
|