fix the prelu for caffe
@@ -467,6 +467,11 @@ class CaffeOpMapper(OpMapper):
data = node.data
assert data is not None, 'The parameter of {} (type is {}) is not set. You need to use python package of caffe to set the default value.'.format(
node.layer_name, node.layer_type)
+ import paddle
+ pd_version = paddle.__version__
+ if pd_version.startswith("1.8.4") or pd_version.startswith("1.8.3"):
+ self.weights[node.layer_name + '_weights'] = data[0].reshape(1, -1)
+ else:
self.weights[node.layer_name + '_weights'] = data[0]
attr = {
'mode': string(mode),
