I have created a struct named TargetData , which includes size, index, and intrinsics of each image.
 struct TargetData{

            int64_t img_idx;
            torch::Tensor tensor_pre;
            torch::Tensor tensor_cur;
            torch::Tensor tensor_next;

            int img_width;
            int img_height;
            torch::Tensor img_K;
            // torch::Tensor img_invK;
        };

when training my own model, one thing I need to do is moving this kind of struct into the CUDA device. how to move a personalized class/struct into the Cuda device? any references or cues would be highly appreciated.