更改维度的顺序,维度索引从1开始
model = Sequential()
model.add(Permute((2, 1), input_shape=(10, 64))) # 交换第一维度和第二维度
# now: model.output_shape == (None, 64, 10)
# note: `None` is the batch dimension
```
参数|描述
--|--
dims|(int,int)
参考:
[官网](https://tensorflow.google.cn/api_docs/python/tf/keras/layers/Permute?hl=en#class_permute)