Skip to content

Commit

Permalink
mypy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felixdittrich92 committed Mar 27, 2024
1 parent 525449f commit a773d9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doctr/models/modules/layers/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _identity_to_conv(
id_tensor = torch.from_numpy(kernel_value).to(identity.weight.device)
self.id_tensor = self._pad_to_mxn_tensor(id_tensor)
kernel = self.id_tensor
std = (identity.running_var + identity.eps).sqrt() # type: ignore[attr-defined]
std = (identity.running_var + identity.eps).sqrt()
t = (identity.weight / std).reshape(-1, 1, 1, 1)
return kernel * t, identity.bias - identity.running_mean * identity.weight / std

Expand Down

0 comments on commit a773d9c

Please sign in to comment.