def equivGradientDescentTest_GradientDescentPart(self, steps, dtype):
    (var0, var1, grads0, grads1) = self.initVariableAndGradient(dtype)
    opt = gradient_descent.GradientDescentOptimizer(3.0, name='sgd')
    sgd_update = opt.apply_gradients(zip([grads0, grads1], [var0, var1]))
    variables.global_variables_initializer().run()
    self.assertAllClose([0.0, 0.0], var0.eval())
    self.assertAllClose([0.0, 0.0], var1.eval())
    for _ in range(steps):
        sgd_update.run()
    return (var0.eval(), var1.eval())
def equivGradientDescentTest_GradientDescentPart(self, steps, dtype):
    (var0, var1, grads0, grads1) = self.initVariableAndGradient(dtype)
    opt = gradient_descent.GradientDescentOptimizer(3.0, name='sgd')
    sgd_update = opt.apply_gradients(zip([grads0, grads1], [var0, var1]))
    variables.global_variables_initializer().run()
    self.assertAllClose([0.0, 0.0], var0.eval())
    self.assertAllClose([0.0, 0.0], var1.eval())
    for _ in range(steps):
        sgd_update.run()
    return (var0.eval(), var1.eval())