I have an equations likes
$y = \sum_{i=0}^3 \alpha_i * prob_i$
where $prob_i$ is a vector 1x32 and $alpha_i$ is a learned parameter. It will be learned during training. So, my code is
class parameter_learning(nn.Module):
    def __init__(self):
        super(parameter_learning, self).__init__()        
        self.alpha_list = []
        for i in range(3):           
            alpha = Parameter(torch.ones(1)).cuda()
            self.alpha_list.append(alpha)
    def forward(self, prob):
        prob_vector = 0
        for i in range (len(prob)):           
            prob_vector + = self.alpha_list[i]*prob[i]
        y = prob_vector
        return y

However, it cannot pass a list parameter to and gave me same number of alpha during training (same as 1)
[tensor([1.], device='cuda:0', grad_fn=<CopyBackwards>), tensor([1.], device='cuda:0', grad_fn=<CopyBackwards>), tensor([1.], device='cuda:0', grad_fn=<CopyBackwards>)]

How can I fix it and make the alpha learnable? Thanks