Audrey:

class Model(nn.Module): def init(self, a, b, hops): self.W1 = torch.nn.Embedding(a, b) self.W2 = torch.nn.Embedding(a, b) self.R_list = [] for i in range(hops): R_list.append(torch.nn.Embedding(a, b))


do you mean something like this,
class Model(nn.Module):
    def __init__(self, a, b, hops):
        super().__init__()
        self.W1 = torch.nn.Embedding(a, b)
        self.W2 = torch.nn.Embedding(a, b)
        self.R_list = nn.ModuleList()
        for i in range(hops):
            self.R_list.append(torch.nn.Embedding(a, b))