decode_to_pytorch_tensor

Engine.decode_to_pytorch_tensor(plaintext)
Converts an encoded plaintext into a PyTorch tensor.
  • Input:
    • Plaintext
  • Output:
    • torch.Tensor
import torch

from desilofhe import Engine

engine = Engine()

message = [1, 2, 3]
encoded = engine.encode(message)

decoded = engine.decode_to_pytorch_tensor(encoded)

Typically, the decode function is handled internally within the decrypt function, so it does not need to be called separately.