require 'nn'
local model = nn.Sequential()
model:add(nn.Identity()) -- Your model that outputs seqlen x batchsize x featsize
local c1 = nn.Sequential():add(nn.Narrow(3,1,1)):add(nn.Sigmoid())
local c2 = nn.Sequential():add(nn.Narrow(3,2,2)):add(nn.SoftMax())
local concat = nn.ConcatTable():add(c1):add(c2) --This will apply the 21-output to both C1 and C2
model:add(concat)
local t = torch.randn(1,1,3)
local out = model:forward(t)
print('input')
print(t)
print('output')
print(out[2])