def permute(layer, layer_in, layerId): out = {layerId: Permute(map(int, layer['params']['dim'].split(',')))(*layer_in)} return out