def testSetWeightsFromV1AdamWithoutMinimize(self):
    keras_v1_adam = optimizers.Adam()
    keras_v2_adam = adam.Adam()
    keras_v2_adam.set_weights(keras_v1_adam.get_weights())
    keras_v1_iteration = keras_v1_adam.iterations
    keras_v2_iteration = keras_v2_adam.iterations
    self.evaluate(variables.global_variables_initializer())
    self.assertEqual(self.evaluate(keras_v1_iteration), self.evaluate(keras_v2_iteration))
def testSetWeightsFromV1AdamWithoutMinimize(self):
    keras_v1_adam = optimizers.Adam()
    keras_v2_adam = adam.Adam()
    keras_v2_adam.set_weights(keras_v1_adam.get_weights())
    keras_v1_iteration = keras_v1_adam.iterations
    keras_v2_iteration = keras_v2_adam.iterations
    self.evaluate(variables.global_variables_initializer())
    self.assertEqual(self.evaluate(keras_v1_iteration), self.evaluate(keras_v2_iteration))