x = torch.tensor([0.01,0.09,0.9]) #sums to 1
log_x = x.log()
log_x.softmax(-1) # == x, so probabilities supplied in x will be recovered
out_layer.bias.data = log_x #what you’re asking for
you don’t have to set weight.data, as it is assumed that matmul(weight, hidden_features) produces zero centered noise initially.