(self)
return model_meta
for metric in self.metrics:
            model_meta.metrics.append(metric)
for metric in self.metrics:
            model_meta.metrics.append(metric)
for metric in self . metrics : model_meta . metrics . append ( metric )
def get_hetero_nn_model_meta(self):
        model_meta = HeteroNNModelMeta()
        model_meta.config_type = self.config_type

        if self.config_type == "nn":
            for layer in self.bottom_nn_define:
                model_meta.bottom_nn_define.append(json.dumps(layer))

            for layer in self.top_nn_define:
                model_meta.top_nn_define.append(json.dumps(layer))
        elif self.config_type == "keras":
            model_meta.bottom_nn_define.append(json.dumps(self.bottom_nn_define))
            model_meta.top_nn_define.append(json.dumps(self.top_nn_define))

        model_meta.interactive_layer_define = json.dumps(self.interactive_layer_define)
        model_meta.interactive_layer_lr = self.hetero_nn_param.interactive_layer_lr

        model_meta.loss = self.loss

        """
        for metric in self.metrics:
            model_meta.metrics.append(metric)
        """

        optimizer_param = OptimizerParam()
        optimizer_param.optimizer = self.optimizer.optimizer
        optimizer_param.kwargs = json.dumps(self.optimizer.kwargs)

        model_meta.optimizer_param.CopyFrom(optimizer_param)

        return model_meta
def get_hetero_nn_model_meta ( self ) : model_meta = HeteroNNModelMeta ( ) model_meta . config_type = self . config_type if self . config_type == "nn" : for layer in self . bottom_nn_define : model_meta . bottom_nn_define . append ( json . dumps ( layer ) ) for layer in self . top_nn_define : model_meta . top_nn_define . append ( json . dumps ( layer ) ) elif self . config_type == "keras" : model_meta . bottom_nn_define . append ( json . dumps ( self . bottom_nn_define ) ) model_meta . top_nn_define . append ( json . dumps ( self . top_nn_define ) ) model_meta . interactive_layer_define = json . dumps ( self . interactive_layer_define ) model_meta . interactive_layer_lr = self . hetero_nn_param . interactive_layer_lr model_meta . loss = self . loss optimizer_param = OptimizerParam ( ) optimizer_param . optimizer = self . optimizer . optimizer optimizer_param . kwargs = json . dumps ( self . optimizer . kwargs ) model_meta . optimizer_param . CopyFrom ( optimizer_param ) return model_meta