Hi Guys,
I know the following code worked fine:
a = Variable('a')
b = Variable('b')
c = mx.symbol.concat(a, b, dim=1)
My question is:
How can I use mx.symbol.concat if I had many variables? I have tried to put them into a list but doesn’t seem to work. The following logic doesn’t work for me:
variables = []
for ii in range(100):
variables.append(Variable(str(ii)))
c = mx.symbol.concat(variables, dim=1)
I also tried:
c = mx.symbol.concat(tuple(variables), dim=1)
, not working either
Found the answer:
c = mx.symbol.concat(*variables, dim=1)
worked