Other functions (modules) usually return a Dim when they potentially could introduce a new dim (e.g. nn.pool). nn.concat does not.
In case you concat in the feature dim, this is maybe not so necessary, as we still have special logic for handling the feature dim. But in that case, you anyway also have nn.concat_features, which is simpler to use.
But in other cases, I think it should return the Dim, just for consistency to other functions.
Other functions (modules) usually return a
Dim
when they potentially could introduce a new dim (e.g.nn.pool
).nn.concat
does not.In case you concat in the feature dim, this is maybe not so necessary, as we still have special logic for handling the feature dim. But in that case, you anyway also have
nn.concat_features
, which is simpler to use.But in other cases, I think it should return the
Dim
, just for consistency to other functions.