Traceback (most recent call last):
File "easyai/tools/feature_save/one_class_feature_save.py", line 62, in <module>
main()
File "easyai/tools/feature_save/one_class_feature_save.py", line 57, in main
task.process_test(options.valPath)
File "easyai/tools/feature_save/one_class_feature_save.py", line 28, in process_test
self.test(epoch)
File "easyai/tools/feature_save/one_class_feature_save.py", line 33, in test
prediction, _ = self.inference.infer(batch_data)
File "/home/wfw/workspace/Test/easy_ai/easyai/tasks/one_class/one_class.py", line 53, in infer
model_output = self.model(image_data)
File "/home/wfw/workspace/Test/TestENV/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in __call__
result = self.forward(*input, **kwargs)
File "/home/wfw/workspace/Test/easy_ai/easyai/model/cls/padim_net.py", line 67, in forward
x = block(layer_outputs, base_outputs)
File "/home/wfw/workspace/Test/TestENV/lib/python3.6/site-packages/torch/nn/modules/module.py", line 550, in __call__
result = self.forward(*input, **kwargs)
File "/home/wfw/workspace/Test/easy_ai/easyai/model_block/head/cls/patch_head.py", line 42, in forward
x = self.embedding_concat(x, feature) # n, c, h, w
File "/home/wfw/workspace/Test/easy_ai/easyai/model_block/head/cls/patch_head.py", line 27, in embedding_concat
z[:, :, i, :, :] = torch.cat((x[:, :, i, :, :], y), 1)
RuntimeError: All input tensors must be on the same device. Received cpu and cuda:0
运行命令:
报错如下: