Hi,
You should recompute the value in the forward but without trying to override the original Parameter:
class RandomClass(torch.nn.module):
     def __init__():
          ...
          self._weights = torch.nn.Parameter(0.5*torch.ones(2), requires_grad=True)
          ...

     def forward():
         softmaxed_weights = torch.nn.functional.softmax(self._weights)

         argument_scores = (softmaxed_weights[0]*A) + (softmaxed_weights[1]*B) 

Also note that you should never use .data in general as it most likely means that your code will lead to more bugs.