r"""Performs tensor dtype and/or device conversion to all attributes :obj:`*keys`. If :obj:`*keys` is not given, the conversion is applied to all present attributes.
(self, device, *keys)
| 121 | return self.apply(lambda x: x.contiguous(), *keys) |
| 122 | |
| 123 | def to(self, device, *keys): |
| 124 | r"""Performs tensor dtype and/or device conversion to all attributes |
| 125 | :obj:`*keys`. |
| 126 | If :obj:`*keys` is not given, the conversion is applied to all present |
| 127 | attributes.""" |
| 128 | return self.apply(lambda x: x.to(device), *keys) |
| 129 | |
| 130 | def cuda(self, *keys): |
| 131 | return self.apply(lambda x: x.cuda(), *keys) |