The PermuteDataSetPreProcessor will rearrange the dimensions.
There are two pre-defined permutation types:
- from NCHW to NHWC
- from NHWC to NCHW
Or, pass the new order to the ctor. For example PermuteDataSetPreProcessor(1, 2, 0) will rearrange the middle dimension first, the last one in the middle and the first one last.