Skip to content

Commit f2c31c9

Browse files
committed
added squeeze op, optionally reduces batch dim if bs == 1
1 parent ad127ef commit f2c31c9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

torch_enhance/models/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,4 +79,5 @@ def enhance(self, x: torch.Tensor) -> torch.Tensor:
7979
x *= 255.0
8080
x = x.clamp(0, 255)
8181
x = x.to(torch.uint8)
82+
x = x.squeeze(0)
8283
return x

0 commit comments

Comments
 (0)