Spaces:
Running
Running
Update main_test_CMFNet.py
Browse files- main_test_CMFNet.py +2 -2
main_test_CMFNet.py
CHANGED
@@ -42,7 +42,7 @@ def main():
|
|
42 |
load_checkpoint(model, args.weights)
|
43 |
|
44 |
|
45 |
-
mul =
|
46 |
for file_ in files:
|
47 |
img = Image.open(file_).convert('RGB')
|
48 |
input_ = TF.to_tensor(img).unsqueeze(0).to(device)
|
@@ -55,7 +55,7 @@ def main():
|
|
55 |
input_ = F.pad(input_, (0, padw, 0, padh), 'reflect')
|
56 |
with torch.no_grad():
|
57 |
restored = model(input_)
|
58 |
-
|
59 |
restored = torch.clamp(restored, 0, 1)
|
60 |
restored = restored[:, :, :h, :w]
|
61 |
restored = restored.permute(0, 2, 3, 1).cpu().detach().numpy()
|
|
|
42 |
load_checkpoint(model, args.weights)
|
43 |
|
44 |
|
45 |
+
mul = 8
|
46 |
for file_ in files:
|
47 |
img = Image.open(file_).convert('RGB')
|
48 |
input_ = TF.to_tensor(img).unsqueeze(0).to(device)
|
|
|
55 |
input_ = F.pad(input_, (0, padw, 0, padh), 'reflect')
|
56 |
with torch.no_grad():
|
57 |
restored = model(input_)
|
58 |
+
restored = restored[0]
|
59 |
restored = torch.clamp(restored, 0, 1)
|
60 |
restored = restored[:, :, :h, :w]
|
61 |
restored = restored.permute(0, 2, 3, 1).cpu().detach().numpy()
|