schnetpack icon indicating copy to clipboard operation
schnetpack copied to clipboard

restructure embeddings to avoid issues with torch jit

Open stefaanhessmann opened this issue 1 year ago • 0 comments

I restructured the embeddings to avoid problems with torch jit.

Nuclear and electronic embeddings are separated, because electronic embeddings currently require (embedding, inputs) as arguments in the forward pass and nuclear embeddings only require atomic_numbers in the forward pass. With this, we can further use torch.nn.Embedding as a default value and electronic embeddings can be added as nn.ModuleList.

This is still a draft and not tested!

stefaanhessmann avatar May 14 '24 20:05 stefaanhessmann