def _compile_model(self, input, output, params):
    '\n        Compile network structure with particular loss and optimizer\n        '
    if (params['loss'] in obj.MFOM_OBJECTIVES):
        (_, _, frames, _) = self.input_shape
        y_true = Input(shape=(frames, self.nclass), name='y_true')
        psi = mfom.UvZMisclassification(name='uvz_misclass')([y_true, output])
        y_pred = mfom.SmoothErrorCounter(name='smooth_error_counter')(psi)
        input = [y_true, input]
        output = y_pred
        loss = obj.MFOM_OBJECTIVES[params['loss']]
    elif (params['loss'] == obj.mfom_eer_embed.__name__):
        loss = obj.mfom_eer_embed
    else:
        loss = params['loss']
    if (params['optimizer'] == 'adam'):
        optimizer = Adam(lr=params['learn_rate'], beta_1=0.9, beta_2=0.999, epsilon=1e-08)
    elif (params['optimizer'] == 'sgd'):
        optimizer = SGD(lr=params['learn_rate'], decay=1e-06, momentum=0.9, nesterov=True)
    elif (params['optimizer'] == 'adadelta'):
        optimizer = Adadelta(lr=params['learn_rate'])
    elif (params['optimizer'] == 'rmsprop'):
        optimizer = RMSprop(lr=params['learn_rate'])
    else:
        optimizer = params['optimizer']
    self.model = Model(input=input, output=output)
    self.model.compile(loss=loss, optimizer=optimizer)
    self.model.summary()
Compile network structure with particular loss and optimizer
def _compile_model(self, input, output, params):
    '\n        \n        '
    if (params['loss'] in obj.MFOM_OBJECTIVES):
        (_, _, frames, _) = self.input_shape
        y_true = Input(shape=(frames, self.nclass), name='y_true')
        psi = mfom.UvZMisclassification(name='uvz_misclass')([y_true, output])
        y_pred = mfom.SmoothErrorCounter(name='smooth_error_counter')(psi)
        input = [y_true, input]
        output = y_pred
        loss = obj.MFOM_OBJECTIVES[params['loss']]
    elif (params['loss'] == obj.mfom_eer_embed.__name__):
        loss = obj.mfom_eer_embed
    else:
        loss = params['loss']
    if (params['optimizer'] == 'adam'):
        optimizer = Adam(lr=params['learn_rate'], beta_1=0.9, beta_2=0.999, epsilon=1e-08)
    elif (params['optimizer'] == 'sgd'):
        optimizer = SGD(lr=params['learn_rate'], decay=1e-06, momentum=0.9, nesterov=True)
    elif (params['optimizer'] == 'adadelta'):
        optimizer = Adadelta(lr=params['learn_rate'])
    elif (params['optimizer'] == 'rmsprop'):
        optimizer = RMSprop(lr=params['learn_rate'])
    else:
        optimizer = params['optimizer']
    self.model = Model(input=input, output=output)
    self.model.compile(loss=loss, optimizer=optimizer)
    self.model.summary()