Custom output names for keras model I have a model like this with multiple outputs and i want to change it's output names

class MyModel(Model):
    def __init__(self):
        super(MyModel, self).__init__()
        self.layer_one = Dense(1, name='output_name_one')
        self.layer_two = Dense(1, name='output_name_two')
    def call(self, inputs):
        output_name_one = self.layer_one(inputs)  
        output_name_two = self.layer_two(inputs)  
        return output_name_one, output_name_two


keras automatically set output names to output_1, output_2, ... how can i change the output names to my desired names?
I also have this issue, but didn't have the answer with a customized Model.
There is a workaround as follows:
 model = Model(inputs=inputs,
                  outputs={'ctr_output': ctr_pred, 'ctcvr_pred': ctcvr_pred, 'cvr_output': cvr_pred})