MNNDump2Json
将MNN模型bin文件 dump 成可读的类json格式文件,以方便对比原始模型参数。
./MNNDump2Json ../../../resource/model/MobileNet/v2/mobilenet_v2.caffe.mnn output.json
cat output.json
{ oplists:
[
{ type: Input, name: "data", outputIndexes:
[ 0 ]
, main_type: Input, main:
{ dims:
[ 1, 3, ... ]
}
}
,
{ type: Convolution, name: "conv1", inputIndexes:
[ 0 ]
, outputIndexes:
[ 1 ]
, main_type: Convolution2D, main:
{ common:
{ dilateX: 1, dilateY: 1, strideX: 2, strideY: 2, kernelX: 3, kernelY: 3, padX: 1, padY: 1, group: 1, outputCount: 32, relu: true }
, weight:
[ -0.113041, 0.15978, ... ]
, bias:
[ 0.61395, 2.009104, ... ]
}
}
,
...
]
, tensorName:
[ "data", "conv1/bn", "conv2_1/expand/bn", "conv2_1/dwise/bn", "conv2_1/linear/bn", "conv2_2/expand/bn", "conv2_2/dwise/bn", "conv2_2/linear/bn", "conv3_1/expand/bn", "conv3_1/dwise/bn", "conv3_1/linear/bn", "block_3_1", "conv3_2/expand/bn", "conv3_2/dwise/bn", "conv3_2/linear/bn", "conv4_1/expand/bn", "conv4_1/dwise/bn", "conv4_1/linear/bn", "block_4_1", "conv4_2/expand/bn", "conv4_2/dwise/bn", "conv4_2/linear/bn", "block_4_2", "conv4_3/expand/bn", "conv4_3/dwise/bn", "conv4_3/linear/bn", "conv4_4/expand/bn", "conv4_4/dwise/bn", "conv4_4/linear/bn", "block_4_4", "conv4_5/expand/bn", "conv4_5/dwise/bn", "conv4_5/linear/bn", "block_4_5", "conv4_6/expand/bn", "conv4_6/dwise/bn", "conv4_6/linear/bn", "block_4_6", "conv4_7/expand/bn", "conv4_7/dwise/bn", "conv4_7/linear/bn", "conv5_1/expand/bn", "conv5_1/dwise/bn", "conv5_1/linear/bn", "block_5_1", "conv5_2/expand/bn", "conv5_2/dwise/bn", "conv5_2/linear/bn", "block_5_2", "conv5_3/expand/bn", "conv5_3/dwise/bn", "conv5_3/linear/bn", "conv6_1/expand/bn", "conv6_1/dwise/bn", "conv6_1/linear/bn", "block_6_1", "conv6_2/expand/bn", "conv6_2/dwise/bn", "conv6_2/linear/bn", "block_6_2", "conv6_3/expand/bn", "conv6_3/dwise/bn", "conv6_3/linear/bn", "conv6_4/bn", "pool6", "fc7", "prob" ]
, bizCode: "0000" }