diff --git a/x2paddle/decoder/caffe_decoder.py b/x2paddle/decoder/caffe_decoder.py index ea9d3bc76c06f976b082838b1d794e95ac3488d0..dc1d91091114ff2a4584e1052421aa2ea9bd4dfd 100644 --- a/x2paddle/decoder/caffe_decoder.py +++ b/x2paddle/decoder/caffe_decoder.py @@ -243,7 +243,10 @@ class CaffeDecoder(object): for blob in layer.blobs: if len(blob.shape.dim): dims = blob.shape.dim - c_o, c_i, h, w = map(int, [1] * (4 - len(dims)) + list(dims)) + if layer.type == 'PReLU': + c_o, c_i, h, w = map(int, [1] + list(dims) + [1]* (3 - len(dims))) + else: + c_o, c_i, h, w = map(int, [1] * (4 - len(dims)) + list(dims)) else: c_o = blob.num c_i = blob.channels