def IRun(self):
    if (self.create_Optimizer_func == None):
        raise Exception('No create optimizer function!')
    if (self.create_loss_func == None):
        self.create_loss_func = self._default_categorical_crossentropy
    try:
        opt = self.create_Optimizer_func(self)
        loss = self.create_loss_func(self)
        model = self.output_channel['model']
        '\n            if self.train_only_top_layer:\n                for layer in base_model.layers:\n                    layer.trainable = False\n            '
        model.compile(optimizer=opt, loss=loss, metrics=[self.metrics])
    except Exception as e:
        self.output_channel['Error'] = ('fatal error occur: ' + e.message)
        self.output_channel['ErrorType'] = 'fatal'
def IRun(self):
    if (self.create_Optimizer_func == None):
        raise Exception('No create optimizer function!')
    if (self.create_loss_func == None):
        self.create_loss_func = self._default_categorical_crossentropy
    try:
        opt = self.create_Optimizer_func(self)
        loss = self.create_loss_func(self)
        model = self.output_channel['model']
        '\n            if self.train_only_top_layer:\n                for layer in base_model.layers:\n                    layer.trainable = False\n            '
        model.compile(optimizer=opt, loss=loss, metrics=[self.metrics])
    except Exception as e:
        self.output_channel['Error'] = ('fatal error occur: ' + e.message)
        self.output_channel['ErrorType'] = 'fatal'