(self)
return opt
keras optimizer
keras optimizer
keras optimizer
def get_optimizer(self):
    ''' keras optimizer '''
    optconf = self.config['solver']['optimizer']
    method = optconf['name']

    learning_rate = optconf['learning_rate']['rate']
    if method == 'adam':
      opt = tf.keras.optimizers.Adam(learning_rate=learning_rate)
    elif method == 'adadelta':
      opt = tf.keras.optimizers.Adadelta(learning_rate=learning_rate)
    else:
      raise ValueError(f"Not support optimmizer: {method}")
    return opt
def get_optimizer ( self ) : optconf = self . config [ 'solver' ] [ 'optimizer' ] method = optconf [ 'name' ] learning_rate = optconf [ 'learning_rate' ] [ 'rate' ] if method == 'adam' : opt = tf . keras . optimizers . Adam ( learning_rate = learning_rate ) elif method == 'adadelta' : opt = tf . keras . optimizers . Adadelta ( learning_rate = learning_rate ) else : raise ValueError ( f"Not support optimmizer: {method}" ) return opt