Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ToastCoder committed May 27, 2021
1 parent 0996f17 commit e5f655c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gearai/ga/tf/keras/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ def train_step(self,data):

# ACCUMULATING THE BATCH GRADIENTS
for i in range(len(self.grad_acc)):
self.gradient_acc[i].assign_add(gradients[i])
self.grad_acc[i].assign_add(gradients[i])


tf.cond(tf.equal(self.n_acum_step, self.n_grads), self.apply_accu_gradients, lambda: None)
tf.cond(tf.equal(self.n_acum_step, self.no_grads), self.apply_accu_gradients, lambda: None)

# UPDATING THE METRICS
self.compiled_metrics.update_state(y, y_pred)
Expand Down

0 comments on commit e5f655c

Please sign in to comment.