I just tested removing the call to to(DEVICE) in the snippet above, and it still gives an error that it’s expecting a cuda tensor (e.g., in the call to the embedder,
RuntimeError: Expected object of type torch.cuda.LongTensor but found type torch.LongTensor for argument #3 'index'
self._embedder is an object of a class which extends nn.Module, and has an attribute of type nn.Embedding, which is on the GPU when I make this call to it.