Skip to content

Commit aabfe46

Browse files
Merge pull request #116 from GoBeromsu/master
2 parents 9192f91 + 074b563 commit aabfe46

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

deep_river/anomaly/ae.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,9 @@ def _learn(self, x: torch.Tensor) -> "Autoencoder":
180180
self.module.train()
181181
x_pred = self.module(x)
182182
loss = self.loss_func(x_pred, x)
183+
self.optimizer.zero_grad()
183184
loss.backward()
184185
self.optimizer.step()
185-
self.optimizer.zero_grad()
186186
return self
187187

188188
def score_one(self, x: dict) -> float:

0 commit comments

Comments
 (0)