If there a direct way to map a dictionary variable defined inside a module (or model) to GPU?
e.g. for tensors, I can do a = a.to(device)
However, this doesn’t work for a dictionary.
In other words, is the only possible way is to map the keys individually like the following?
for key, value in self.dict.items():
    self.dict[key] = self.dict[key].to(device)