#!/usr/bin/env python3
"""
Momentum
"""

import tensorflow as tf


def create_momentum_op(loss, alpha, beta1):
    """
    Creates the training operation for a neural network in tensorflow
    using the gradient descent with momentum optimization algorithm:
    Args:
        loss: is the loss of the network
        alpha: is the learning rate
        beta1: is the momentum weight
    Returns:
        The momentum optimization operation
    """

    # tf.train.MomentumOptimizer
    # https://github.com/tensorflow/docs/blob/r1.12/site/en/api_docs/python/tf/train/MomentumOptimizer.md
    # Optimizer that implements the Momentum algorithm.
    train = tf.train.MomentumOptimizer(learning_rate=alpha, momentum=beta1)

    op = train.minimize(loss)
    return op

70cf376664d7478e3f5909f2a22ec15b5c807dd3
<mask token>

<mask token>


def create_momentum_op(loss, alpha, beta1):
    """
    Creates the training operation for a neural network in tensorflow
    using the gradient descent with momentum optimization algorithm:
    Args:
        loss: is the loss of the network
        alpha: is the learning rate
        beta1: is the momentum weight
    Returns:
        The momentum optimization operation
    """
    train = tf.train.MomentumOptimizer(learning_rate=alpha, momentum=beta1)
    op = train.minimize(loss)
    return op

<mask token>
import tensorflow as tf


def create_momentum_op(loss, alpha, beta1):
    """
    Creates the training operation for a neural network in tensorflow
    using the gradient descent with momentum optimization algorithm:
    Args:
        loss: is the loss of the network
        alpha: is the learning rate
        beta1: is the momentum weight
    Returns:
        The momentum optimization operation
    """
    train = tf.train.MomentumOptimizer(learning_rate=alpha, momentum=beta1)
    op = train.minimize(loss)
    return op

#!/usr/bin/env python3
"""
Momentum
"""

import tensorflow as tf


def create_momentum_op(loss, alpha, beta1):
    """
    Creates the training operation for a neural network in tensorflow
    using the gradient descent with momentum optimization algorithm:
    Args:
        loss: is the loss of the network
        alpha: is the learning rate
        beta1: is the momentum weight
    Returns:
        The momentum optimization operation
    """

    # tf.train.MomentumOptimizer
    # https://github.com/tensorflow/docs/blob/r1.12/site/en/api_docs/python/tf/train/MomentumOptimizer.md
    # Optimizer that implements the Momentum algorithm.
    train = tf.train.MomentumOptimizer(learning_rate=alpha, momentum=beta1)

    op = train.minimize(loss)
    return op
