def METHOD_NAME(i, epsilon):
    param = layer.get_param(param_name)
    shape = param.shape
    param = param.ravel()
    param[i] += epsilon
    layer.set_param(param_name, param.reshape(shape))
    outputs = layer.METHOD_NAME(inputs)
    param[i] -= epsilon
    layer.set_param(param_name, param.reshape(shape))
    return outputs.reshape(shape)