Does Sparse Embedding exist in C++ pytorch?

Can you give me a c++ snippet code to create a sparse embedding using pytorch? I couldn’t find it anywhere thank you.