Commit 4ad65e4
committed
fix(losses): annotate preterm/bin_centers buffers to satisfy mypy
register_buffer leaves mypy inferring the broad ``Tensor | Module`` union,
which fails the arithmetic on these attributes in parzen_windowing_gaussian.
Declare them as ``torch.Tensor`` (the type at the gaussian-kernel use sites).
Signed-off-by: Oleksandr Sanin <alexaaander.sanin@gmail.com>1 parent aa35cb1 commit 4ad65e4
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
236 | 240 | | |
237 | 241 | | |
238 | 242 | | |
| |||
0 commit comments