Avoid a warning by using  'x = x * y' instead of 'x *= y'
@@ -175,7 +175,7 @@ class SGD(Optimizer):
lr = self.lr
if self.initial_decay > 0:
- lr *= (1. / (1. + self.decay * K.cast(self.iterations,
+ lr = lr * (1. / (1. + self.decay * K.cast(self.iterations,
K.dtype(self.decay))))
# momentum
shapes = [K.int_shape(p) for p in params]
@@ -248,7 +248,7 @@ class RMSprop(Optimizer):
lr = self.lr
if self.initial_decay > 0:
- lr *= (1. / (1. + self.decay * K.cast(self.iterations,
+ lr = lr * (1. / (1. + self.decay * K.cast(self.iterations,
K.dtype(self.decay))))
for p, g, a in zip(params, grads, accumulators):
@@ -309,7 +309,7 @@ class Adagrad(Optimizer):
lr = self.lr
if self.initial_decay > 0:
- lr *= (1. / (1. + self.decay * K.cast(self.iterations,
+ lr = lr * (1. / (1. + self.decay * K.cast(self.iterations,
K.dtype(self.decay))))
for p, g, a in zip(params, grads, accumulators):
@@ -373,7 +373,7 @@ class Adadelta(Optimizer):
lr = self.lr
if self.initial_decay > 0:
- lr *= (1. / (1. + self.decay * K.cast(self.iterations,
+ lr = lr * (1. / (1. + self.decay * K.cast(self.iterations,
K.dtype(self.decay))))
for p, g, a, d_a in zip(params, grads, accumulators, delta_accumulators):
@@ -447,7 +447,7 @@ class Adam(Optimizer):
lr = self.lr
if self.initial_decay > 0:
- lr *= (1. / (1. + self.decay * K.cast(self.iterations,
+ lr = lr * (1. / (1. + self.decay * K.cast(self.iterations,
K.dtype(self.decay))))
t = K.cast(self.iterations, K.floatx()) + 1
@@ -531,7 +531,7 @@ class Adamax(Optimizer):
lr = self.lr
if self.initial_decay > 0:
- lr *= (1. / (1. + self.decay * K.cast(self.iterations,
+ lr = lr * (1. / (1. + self.decay * K.cast(self.iterations,
K.dtype(self.decay))))
t = K.cast(self.iterations, K.floatx()) + 1
