Skip to content

Commit 4c2fc44

Browse files
committed
try to fix pytest
1 parent 7c0f596 commit 4c2fc44

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tiatoolbox/models/architecture/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,12 @@ def __init__(self: UpSample2x) -> None:
201201
"""Initialize :class:`UpSample2x`."""
202202
super().__init__()
203203
# correct way to create constant within module
204-
205-
self.unpool_mat: torch.Tensor
204+
self.unpool_mat:torch.Tensor
206205
self.register_buffer(
207206
"unpool_mat",
208207
torch.from_numpy(np.ones((2, 2), dtype="float32")),
209208
)
210-
self.unpool_mat.unsqueeze_(0)
209+
self.unpool_mat.unsqueeze(0)
211210

212211
def forward(self: UpSample2x, x: torch.Tensor) -> torch.Tensor:
213212
"""Logic for using layers defined in init.

0 commit comments

Comments
 (0)