1 FullyConnected 1 Concat SoftmaxOutput _Plus Concat FullyConnected 1 FullyConnected 1 Concat SoftmaxOutput In [4]: data = mx.sym.Variable('data') net = data fco = [] smo = [] cum = None for ii in range(3): if ii > 0: if cum is None: cum = pos else: cum = cum + pos net = mx.sym.Concat(*[net, cum]) neg = mx.sym.FullyConnected(net, num_hidden=1) pos = mx.sym.FullyConnected(net, num_hidden=1) fco.append(mx.sym.Concat(*[neg, pos])) smo.append(mx.sym.SoftmaxOutput(fco[ii])) out = mx.sym.Group(smo)