We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c0f596 commit 4c2fc44Copy full SHA for 4c2fc44
tiatoolbox/models/architecture/utils.py
@@ -201,13 +201,12 @@ def __init__(self: UpSample2x) -> None:
201
"""Initialize :class:`UpSample2x`."""
202
super().__init__()
203
# correct way to create constant within module
204
-
205
- self.unpool_mat: torch.Tensor
+ self.unpool_mat:torch.Tensor
206
self.register_buffer(
207
"unpool_mat",
208
torch.from_numpy(np.ones((2, 2), dtype="float32")),
209
)
210
- self.unpool_mat.unsqueeze_(0)
+ self.unpool_mat.unsqueeze(0)
211
212
def forward(self: UpSample2x, x: torch.Tensor) -> torch.Tensor:
213
"""Logic for using layers defined in init.
0 commit comments