We can add required grad variable into class by
class MyModule(nn.Module):
    def __init__(self):
        super(MyModule, self).__init__()
        self.params = nn.ParameterList([nn.Parameter(torch.randn(10, 10)) for i in range(10)])


BUT for non-required grad class tensor, such as
class MyModule(nn.Module):
    def __init__(self):
        super(MyModule, self).__init__()
        self.params = [torch.randn(10, 10) for i in range(10)]
        for i, tensor in self.params:
             self.register_buffer("tensors:%d"%i, tensor)



althouth we can use self.register_buffer(name, tensor) for all the tensor in self.params, it still can not automatically convert between cpu and cuda by calling MyModule().to(device).
Is there any method like nn.ParameterList that can convert tensor automatically in class?