Generalize ConcatenateLayer.