diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/SoftmaxKernel.swift b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/SoftmaxKernel.swift index b94f0286f43ec482353ff278c6c104da77f47315..ec7d7134a713dc99a3cecf1052500f72d83f0a56 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/SoftmaxKernel.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/SoftmaxKernel.swift @@ -27,6 +27,7 @@ class SoftmaxKernel: Kernel, Computable{ } required init(device: MTLDevice, param: SoftmaxParam

) { + param.output.initTexture(device: device) super.init(device: device, inFunctionName: "softmax") } } diff --git a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/TransposeKernel.swift b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/TransposeKernel.swift index 8d7fee1c6ed586616a3ab281ed7221c52107d0f9..dd0577c878adffc4061044513e6ffcfa99e08908 100644 --- a/metal/paddle-mobile/paddle-mobile/Operators/Kernels/TransposeKernel.swift +++ b/metal/paddle-mobile/paddle-mobile/Operators/Kernels/TransposeKernel.swift @@ -49,7 +49,11 @@ class TransposeKernel: Kernel, Computable, Testable { for (i, v) in param.input.transpose.enumerated() { invT[v] = i } - let realAxis = param.axis.map {invT[$0]} + var axis: [Int] = [0, 1, 2, 3] + for i in 0..