change cpu
Browse files- inference.py +2 -1
inference.py
CHANGED
@@ -12,6 +12,8 @@ from utils.image_io import save_image_tensor
|
|
12 |
|
13 |
from text_net.model import AirNet
|
14 |
|
|
|
|
|
15 |
def test_Derain_Dehaze(opt, net, dataset, task="derain"):
|
16 |
output_path = opt.output_path + task + '/'
|
17 |
subprocess.check_output(['mkdir', '-p', output_path])
|
@@ -39,7 +41,6 @@ def infer(text_prompt = "", img=None):
|
|
39 |
|
40 |
opt = parser.parse_args()
|
41 |
# opt.text_prompt = text_prompt
|
42 |
-
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
43 |
|
44 |
np.random.seed(0)
|
45 |
torch.manual_seed(0)
|
|
|
12 |
|
13 |
from text_net.model import AirNet
|
14 |
|
15 |
+
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
16 |
+
|
17 |
def test_Derain_Dehaze(opt, net, dataset, task="derain"):
|
18 |
output_path = opt.output_path + task + '/'
|
19 |
subprocess.check_output(['mkdir', '-p', output_path])
|
|
|
41 |
|
42 |
opt = parser.parse_args()
|
43 |
# opt.text_prompt = text_prompt
|
|
|
44 |
|
45 |
np.random.seed(0)
|
46 |
torch.manual_seed(0)
|