'Trouble extracting numbers from helib::Ctxt ciphertext

I'd like to access directly to the numbers composing the ciphertext Ctxt from HElib, but reading the documentation I don't seem to find anything that can help me.

I have an object Ctxt containing the ciphertext of a vector representing an image; I understand that the real ciphertext is stored in the attribute "parts" of the object, but there is no getter method to access this attribute.

I need these numbers in order to create a torch::Tensor and train a neural network, obviously there is no direct method to convert an object of type helib::Ctxt to a torch::Tensor.

What am I missing? Thanks in advance for the help.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source