Suppose I have an output layer with a number of outputs, 21 to be more specific.
Now one of the outputs represent a probability and has to be mapped to the [0,1] interval by a sigmoid function.
Another 20 outputs represents weights and have to sum to 1 (a softmax function has to be applied here).
How to implement this in Torch?
model = nn.Sequential()
....
... hidden layers etc
model:add(nn.Linear(hiddenSize, 21)) -- 21 outputs
-- what here??
nn.Sigmoid()
nn.SoftMax()
I looked to SplitTable. However, I do not see how to apply this.