diff --git a/x2paddle/optimizer/tensorflow/prelu.py b/x2paddle/optimizer/tensorflow/prelu.py index 6eba183ec09d11228103a78b374e1820574b7b73..c9206052dfd194c0d1d560fe71b88a3a8ba1e023 100644 --- a/x2paddle/optimizer/tensorflow/prelu.py +++ b/x2paddle/optimizer/tensorflow/prelu.py @@ -118,5 +118,7 @@ class PReLUOpt: graph.layers[transpose0.id] = transpose0 graph.layers[prelu.id] = prelu graph.layers[transpose1.id] = transpose1 - graph.parameters[alpha.outputs[0]] = np.expand_dims(graph.parameters[alpha.outputs[0]], axis=(0, 2, 3)) + graph.parameters[alpha.outputs[0]] = np.expand_dims(graph.parameters[alpha.outputs[0]], axis=(0)) + graph.parameters[alpha.outputs[0]] = np.expand_dims(graph.parameters[alpha.outputs[0]], axis=(2)) + graph.parameters[alpha.outputs[0]] = np.expand_dims(graph.parameters[alpha.outputs[0]], axis=(3)) graph.build() \ No newline at end of file