I’m looking into the function torch.nn.functional.embedding — PyTorch 2.5 documentation , and want to have an out
argument so that I can pass an existing buffer to it.
it looks strange why it does not have.
I can also use torch.index_select(embedding.weight, dim=0, index=input, out=output_buffer)
since my index is only 1D. I’d like to know if pytorch has some existing solution though.