you may move your tensors to the GPU at start , run the whole pipeline ...
& avoid having to write detach() / moving back to CPU at each filter end ... (in case you want to use the filters separately).
Two options:
1/ convert at display level
2/ introduce (inside a "filter_zoo") a generic purpose filter which would allow moving the tensor back to the CPU... again this does not seem very nice.
you may move your tensors to the GPU at start , run the whole pipeline ... & avoid having to write detach() / moving back to CPU at each filter end ... (in case you want to use the filters separately).
Two options: 1/ convert at display level 2/ introduce (inside a "filter_zoo") a generic purpose filter which would allow moving the tensor back to the CPU... again this does not seem very nice.