Convert to tensor in predict.py
Former-commit-id: be1ad32304f2365c0c1db6b0e7fb835acc0fbfed
This commit is contained in:
parent
5a7e934560
commit
0d1cc25ae2
|
@ -23,7 +23,7 @@ def predict_img(net,
|
||||||
net.eval()
|
net.eval()
|
||||||
|
|
||||||
ds = BasicDataset('', '', scale=scale_factor)
|
ds = BasicDataset('', '', scale=scale_factor)
|
||||||
img = ds.preprocess(full_img)
|
img = torch.from_numpy(ds.preprocess(full_img))
|
||||||
|
|
||||||
img = img.unsqueeze(0)
|
img = img.unsqueeze(0)
|
||||||
img = img.to(device=device, dtype=torch.float32)
|
img = img.to(device=device, dtype=torch.float32)
|
||||||
|
|
Loading…
Reference in a new issue