How do I store tensors in a database?

I want to store the calculated eigenvectors in a database, such as Mysql, and then take them out of the database during validation, and then calculate the similarity. The method I used to calculate the similarity is as follows:

`

/ / cvec1. Sizes () = (1, 512], cvec1. Sizes () = [1, 512]

Tensor score = at::cosine_similarity(cvec1, cvec2);

Return score. The item < float > ();

}

`

Is there a good solution?

Thanks