from.registerimportregisterfromx2paddle.core.utilimport*defpermute_shape(input_shape,order=None):inshape=input_shape[0]output_shape=[]foriiinorder:assertii<len(inshape),"invalid order for permute[%s]"%(name)output_shape.append(inshape[ii])return[output_shape]defpermute_layer(inputs,order=None,input_shape=None,name=None):input=inputs[0]order=list(order)