[pytorch] Fix load model with use_gpu option
authorYongjoo Ahn <yongjoo1.ahn@samsung.com>
Thu, 7 Sep 2023 08:58:40 +0000 (17:58 +0900)
committerjaeyun-jung <39614140+jaeyun-jung@users.noreply.github.com>
Tue, 12 Sep 2023 02:43:16 +0000 (11:43 +0900)
commit260841614639a906a12462723cf38ee3604f69ba
tree81375c1d7b006c7e8f5c0c08e0f3e69f2639896a
parent2d35b41a55146e54b20245fa095fbf096c539bfc
[pytorch] Fix load model with use_gpu option

- In the recent pytorch, `model->to (device)` does not work properly.
- Use `torch::jit::load (model, torch::Device)` instead.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
ext/nnstreamer/tensor_filter/tensor_filter_pytorch.cc