Unweighted average
This can be done as follows
# here out1, out2 are after softmax
out1 = model1(input)
out2 = model2(input)

out = (out1+out2)/2

The idea behind this unweighted average is the models typically have high variance and low bias, so we can combine these models by simply adding their outputs to reduce the variance.
You should average the output of softmax layer rather than raw scores because they may be on different scales.
Unweighted average is a good idea when both the models are similar i.e. it is not the case that model1 is a lot better than model2.
Weighted average
out1 = model1(input)
out2 = model2(input)

out = out1*weight1 + out2*weight2
# weight1+weight2 = 1

Here you can train a linear classifier to learn the optimal values of weight1 and weight2 after your original models (model1, model2) have converged. Be careful not to overfit.