Avoid non-4-dimensional design in classification model
Created by: NHZlX
Five-dimensional tensor has emerged, which is very unfriendly to the design of inference subgraph.
Suggest:
x = fluid.layers.reshape(
x=x, shape=[batchsize, groups, channels_per_group, width * height])
x = fluid.layers.transpose(x=x, perm=[0, 2, 1, 3])
x = fluid.layers.reshape(
x=x, shape=[batchsize, num_channels, height, width])