'if h.momentum_change_steps > step:
f = float(step) / h.momentum_change_steps
momentum = (1.0 - f) * h.initial_momentum + f * h.final_momentum
else:
momentum = h.final_momentum'

def GetMomentumAndEpsilon(self, step):

    h = self.hyperparams
    momentum = (h.final_momentum - ((h.final_momentum - h.initial_momentum) * np.exp(((- float(step)) / h.momentum_change_steps))))
    epsilon = h.base_epsilon
    if (h.epsilon_decay == deepnet_pb2.Hyperparams.INVERSE_T):
        epsilon = (h.base_epsilon / (1 + (float(step) / h.epsilon_decay_half_life)))
    elif (h.epsilon_decay == deepnet_pb2.Hyperparams.EXPONENTIAL):
        epsilon = (h.base_epsilon / np.power(2, (float(step) / h.epsilon_decay_half_life)))
    if (step < h.start_learning_after):
        epsilon = 0.0
    return (momentum, epsilon)
