def __str__(self): meta_dict = self._get_meta_dict() ret_str = 'Metadata:' for k,v in meta_dict.items(): ret_str += '\n\t%s: %s'%(str(k), str(v)) ret_str += '\n' ret_str += 'Layers:\n' models.model_to_str(self.model) return ret_str
def model_info_handler(args): if args.weights_file: print('Loading model with weights...') # load the meta data too model = gain.AttentionGAIN.load( args.weights_file, gradient_layer_name=args.gradient_layer_name, batch_norm=args.batch_norm) print(model) else: print('Loading model...') model = models.get_model(args.model_type, 1, batch_norm=not args.no_batch_norm) # print every layer in the model print('%s Model Layers:' % args.model_type) print(models.model_to_str(model))