add verify resnet

This commit is contained in:
colin 2020-07-20 17:35:05 +08:00
parent 039310704e
commit ee0a12f7dd
3 changed files with 323 additions and 344 deletions

Binary file not shown.

View File

@ -1,257 +1,268 @@
int RN50_conv1_weight[]={0,37631,}; int RN50_conv1_weight[] = { 0,37631 };
int RN50_bn1_running_mean[]={37632,37887,}; int RN50_bn1_running_mean[] = { 37632,37887 };
int RN50_bn1_running_var[]={37888,38143,}; int RN50_bn1_running_var[] = { 37888,38143 };
int RN50_bn1_weight[]={38144,38399,}; int RN50_bn1_weight[] = { 38144,38399 };
int RN50_bn1_bias[]={38400,38655,}; int RN50_bn1_bias[] = { 38400,38655 };
int RN50_layer1__modules_0_conv1_weight[]={38656,55039,}; int RN50_layer1__modules_0_conv1_weight[] = { 38656,55039 };
int RN50_layer1__modules_0_bn1_running_mean[]={55040,55295,}; int RN50_layer1__modules_0_bn1_running_mean[] = { 55040,55295 };
int RN50_layer1__modules_0_bn1_running_var[]={55296,55551,}; int RN50_layer1__modules_0_bn1_running_var[] = { 55296,55551 };
int RN50_layer1__modules_0_bn1_weight[]={55552,55807,}; int RN50_layer1__modules_0_bn1_weight[] = { 55552,55807 };
int RN50_layer1__modules_0_bn1_bias[]={55808,56063,}; int RN50_layer1__modules_0_bn1_bias[] = { 55808,56063 };
int RN50_layer1__modules_0_conv2_weight[]={56064,203519,}; int RN50_layer1__modules_0_conv2_weight[] = { 56064,203519 };
int RN50_layer1__modules_0_bn2_running_mean[]={203520,203775,}; int RN50_layer1__modules_0_bn2_running_mean[] = { 203520,203775 };
int RN50_layer1__modules_0_bn2_running_var[]={203776,204031,}; int RN50_layer1__modules_0_bn2_running_var[] = { 203776,204031 };
int RN50_layer1__modules_0_bn2_weight[]={204032,204287,}; int RN50_layer1__modules_0_bn2_weight[] = { 204032,204287 };
int RN50_layer1__modules_0_bn2_bias[]={204288,204543,}; int RN50_layer1__modules_0_bn2_bias[] = { 204288,204543 };
int RN50_layer1__modules_0_conv3_weight[]={204544,270079,}; int RN50_layer1__modules_0_conv3_weight[] = { 204544,270079 };
int RN50_layer1__modules_0_bn3_running_mean[]={270080,271103,}; int RN50_layer1__modules_0_bn3_running_mean[] = { 270080,271103 };
int RN50_layer1__modules_0_bn3_running_var[]={271104,272127,}; int RN50_layer1__modules_0_bn3_running_var[] = { 271104,272127 };
int RN50_layer1__modules_0_bn3_weight[]={272128,273151,}; int RN50_layer1__modules_0_bn3_weight[] = { 272128,273151 };
int RN50_layer1__modules_0_bn3_bias[]={273152,274175,}; int RN50_layer1__modules_0_bn3_bias[] = { 273152,274175 };
int RN50_layer1__modules_0_downsample__modules_0_weight[]={274176,339711,}; int RN50_layer1__modules_0_downsample__modules_0_weight[] = { 274176,339711 };
int RN50_layer1__modules_0_downsample__modules_1_running_mean[]={339712,340735,}; int RN50_layer1__modules_0_downsample__modules_1_running_mean[] = { 339712,340735 };
int RN50_layer1__modules_0_downsample__modules_1_running_var[]={340736,341759,}; int RN50_layer1__modules_0_downsample__modules_1_running_var[] = { 340736,341759 };
int RN50_layer1__modules_0_downsample__modules_1_weight[]={341760,342783,}; int RN50_layer1__modules_0_downsample__modules_1_weight[] = { 341760,342783 };
int RN50_layer1__modules_0_downsample__modules_1_bias[]={342784,343807,}; int RN50_layer1__modules_0_downsample__modules_1_bias[] = { 342784,343807 };
int RN50_layer2__modules_0_conv1_weight[]={343808,474879,}; int RN50_layer2__modules_0_conv1_weight[] = { 343808,474879 };
int RN50_layer2__modules_0_bn1_running_mean[]={474880,475391,}; int RN50_layer2__modules_0_bn1_running_mean[] = { 474880,475391 };
int RN50_layer2__modules_0_bn1_running_var[]={475392,475903,}; int RN50_layer2__modules_0_bn1_running_var[] = { 475392,475903 };
int RN50_layer2__modules_0_bn1_weight[]={475904,476415,}; int RN50_layer2__modules_0_bn1_weight[] = { 475904,476415 };
int RN50_layer2__modules_0_bn1_bias[]={476416,476927,}; int RN50_layer2__modules_0_bn1_bias[] = { 476416,476927 };
int RN50_layer2__modules_0_conv2_weight[]={476928,1066751,}; int RN50_layer2__modules_0_conv2_weight[] = { 476928,1066751 };
int RN50_layer2__modules_0_bn2_running_mean[]={1066752,1067263,}; int RN50_layer2__modules_0_bn2_running_mean[] = { 1066752,1067263 };
int RN50_layer2__modules_0_bn2_running_var[]={1067264,1067775,}; int RN50_layer2__modules_0_bn2_running_var[] = { 1067264,1067775 };
int RN50_layer2__modules_0_bn2_weight[]={1067776,1068287,}; int RN50_layer2__modules_0_bn2_weight[] = { 1067776,1068287 };
int RN50_layer2__modules_0_bn2_bias[]={1068288,1068799,}; int RN50_layer2__modules_0_bn2_bias[] = { 1068288,1068799 };
int RN50_layer2__modules_0_conv3_weight[]={1068800,1330943,}; int RN50_layer2__modules_0_conv3_weight[] = { 1068800,1330943 };
int RN50_layer2__modules_0_bn3_running_mean[]={1330944,1332991,}; int RN50_layer2__modules_0_bn3_running_mean[] = { 1330944,1332991 };
int RN50_layer2__modules_0_bn3_running_var[]={1332992,1335039,}; int RN50_layer2__modules_0_bn3_running_var[] = { 1332992,1335039 };
int RN50_layer2__modules_0_bn3_weight[]={1335040,1337087,}; int RN50_layer2__modules_0_bn3_weight[] = { 1335040,1337087 };
int RN50_layer2__modules_0_bn3_bias[]={1337088,1339135,}; int RN50_layer2__modules_0_bn3_bias[] = { 1337088,1339135 };
int RN50_layer2__modules_0_downsample__modules_0_weight[]={1339136,1863423,}; int RN50_layer2__modules_0_downsample__modules_0_weight[] = { 1339136,1863423 };
int RN50_layer2__modules_0_downsample__modules_1_running_mean[]={1863424,1865471,}; int RN50_layer2__modules_0_downsample__modules_1_running_mean[] = { 1863424,1865471 };
int RN50_layer2__modules_0_downsample__modules_1_running_var[]={1865472,1867519,}; int RN50_layer2__modules_0_downsample__modules_1_running_var[] = { 1865472,1867519 };
int RN50_layer2__modules_0_downsample__modules_1_weight[]={1867520,1869567,}; int RN50_layer2__modules_0_downsample__modules_1_weight[] = { 1867520,1869567 };
int RN50_layer2__modules_0_downsample__modules_1_bias[]={1869568,1871615,}; int RN50_layer2__modules_0_downsample__modules_1_bias[] = { 1869568,1871615 };
int RN50_layer2__modules_1_conv1_weight[]={1871616,2133759,}; int RN50_layer2__modules_1_conv1_weight[] = { 1871616,2133759 };
int RN50_layer2__modules_1_bn1_running_mean[]={2133760,2134271,}; int RN50_layer2__modules_1_bn1_running_mean[] = { 2133760,2134271 };
int RN50_layer2__modules_1_bn1_running_var[]={2134272,2134783,}; int RN50_layer2__modules_1_bn1_running_var[] = { 2134272,2134783 };
int RN50_layer2__modules_1_bn1_weight[]={2134784,2135295,}; int RN50_layer2__modules_1_bn1_weight[] = { 2134784,2135295 };
int RN50_layer2__modules_1_bn1_bias[]={2135296,2135807,}; int RN50_layer2__modules_1_bn1_bias[] = { 2135296,2135807 };
int RN50_layer2__modules_1_conv2_weight[]={2135808,2725631,}; int RN50_layer2__modules_1_conv2_weight[] = { 2135808,2725631 };
int RN50_layer2__modules_1_bn2_running_mean[]={2725632,2726143,}; int RN50_layer2__modules_1_bn2_running_mean[] = { 2725632,2726143 };
int RN50_layer2__modules_1_bn2_running_var[]={2726144,2726655,}; int RN50_layer2__modules_1_bn2_running_var[] = { 2726144,2726655 };
int RN50_layer2__modules_1_bn2_weight[]={2726656,2727167,}; int RN50_layer2__modules_1_bn2_weight[] = { 2726656,2727167 };
int RN50_layer2__modules_1_bn2_bias[]={2727168,2727679,}; int RN50_layer2__modules_1_bn2_bias[] = { 2727168,2727679 };
int RN50_layer2__modules_1_conv3_weight[]={2727680,2989823,}; int RN50_layer2__modules_1_conv3_weight[] = { 2727680,2989823 };
int RN50_layer2__modules_1_bn3_running_mean[]={2989824,2991871,}; int RN50_layer2__modules_1_bn3_running_mean[] = { 2989824,2991871 };
int RN50_layer2__modules_1_bn3_running_var[]={2991872,2993919,}; int RN50_layer2__modules_1_bn3_running_var[] = { 2991872,2993919 };
int RN50_layer2__modules_1_bn3_weight[]={2993920,2995967,}; int RN50_layer2__modules_1_bn3_weight[] = { 2993920,2995967 };
int RN50_layer2__modules_1_bn3_bias[]={2995968,2998015,}; int RN50_layer2__modules_1_bn3_bias[] = { 2995968,2998015 };
int RN50_layer2__modules_2_conv1_weight[]={2998016,3260159,}; int RN50_layer2__modules_2_conv1_weight[] = { 2998016,3260159 };
int RN50_layer2__modules_2_bn1_running_mean[]={3260160,3260671,}; int RN50_layer2__modules_2_bn1_running_mean[] = { 3260160,3260671 };
int RN50_layer2__modules_2_bn1_running_var[]={3260672,3261183,}; int RN50_layer2__modules_2_bn1_running_var[] = { 3260672,3261183 };
int RN50_layer2__modules_2_bn1_weight[]={3261184,3261695,}; int RN50_layer2__modules_2_bn1_weight[] = { 3261184,3261695 };
int RN50_layer2__modules_2_bn1_bias[]={3261696,3262207,}; int RN50_layer2__modules_2_bn1_bias[] = { 3261696,3262207 };
int RN50_layer2__modules_2_conv2_weight[]={3262208,3852031,}; int RN50_layer2__modules_2_conv2_weight[] = { 3262208,3852031 };
int RN50_layer2__modules_2_bn2_running_mean[]={3852032,3852543,}; int RN50_layer2__modules_2_bn2_running_mean[] = { 3852032,3852543 };
int RN50_layer2__modules_2_bn2_running_var[]={3852544,3853055,}; int RN50_layer2__modules_2_bn2_running_var[] = { 3852544,3853055 };
int RN50_layer2__modules_2_bn2_weight[]={3853056,3853567,}; int RN50_layer2__modules_2_bn2_weight[] = { 3853056,3853567 };
int RN50_layer2__modules_2_bn2_bias[]={3853568,3854079,}; int RN50_layer2__modules_2_bn2_bias[] = { 3853568,3854079 };
int RN50_layer2__modules_2_conv3_weight[]={3854080,4116223,}; int RN50_layer2__modules_2_conv3_weight[] = { 3854080,4116223 };
int RN50_layer2__modules_2_bn3_running_mean[]={4116224,4118271,}; int RN50_layer2__modules_2_bn3_running_mean[] = { 4116224,4118271 };
int RN50_layer2__modules_2_bn3_running_var[]={4118272,4120319,}; int RN50_layer2__modules_2_bn3_running_var[] = { 4118272,4120319 };
int RN50_layer2__modules_2_bn3_weight[]={4120320,4122367,}; int RN50_layer2__modules_2_bn3_weight[] = { 4120320,4122367 };
int RN50_layer2__modules_2_bn3_bias[]={4122368,4124415,}; int RN50_layer2__modules_2_bn3_bias[] = { 4122368,4124415 };
int RN50_layer2__modules_3_conv1_weight[]={4124416,4386559,}; int RN50_layer2__modules_3_conv1_weight[] = { 4124416,4386559 };
int RN50_layer2__modules_3_bn1_running_mean[]={4386560,4387071,}; int RN50_layer2__modules_3_bn1_running_mean[] = { 4386560,4387071 };
int RN50_layer2__modules_3_bn1_running_var[]={4387072,4387583,}; int RN50_layer2__modules_3_bn1_running_var[] = { 4387072,4387583 };
int RN50_layer2__modules_3_bn1_weight[]={4387584,4388095,}; int RN50_layer2__modules_3_bn1_weight[] = { 4387584,4388095 };
int RN50_layer2__modules_3_bn1_bias[]={4388096,4388607,}; int RN50_layer2__modules_3_bn1_bias[] = { 4388096,4388607 };
int RN50_layer2__modules_3_conv2_weight[]={4388608,4978431,}; int RN50_layer2__modules_3_conv2_weight[] = { 4388608,4978431 };
int RN50_layer2__modules_3_bn2_running_mean[]={4978432,4978943,}; int RN50_layer2__modules_3_bn2_running_mean[] = { 4978432,4978943 };
int RN50_layer2__modules_3_bn2_running_var[]={4978944,4979455,}; int RN50_layer2__modules_3_bn2_running_var[] = { 4978944,4979455 };
int RN50_layer2__modules_3_bn2_weight[]={4979456,4979967,}; int RN50_layer2__modules_3_bn2_weight[] = { 4979456,4979967 };
int RN50_layer2__modules_3_bn2_bias[]={4979968,4980479,}; int RN50_layer2__modules_3_bn2_bias[] = { 4979968,4980479 };
int RN50_layer2__modules_3_conv3_weight[]={4980480,5242623,}; int RN50_layer2__modules_3_conv3_weight[] = { 4980480,5242623 };
int RN50_layer2__modules_3_bn3_running_mean[]={5242624,5244671,}; int RN50_layer2__modules_3_bn3_running_mean[] = { 5242624,5244671 };
int RN50_layer2__modules_3_bn3_running_var[]={5244672,5246719,}; int RN50_layer2__modules_3_bn3_running_var[] = { 5244672,5246719 };
int RN50_layer2__modules_3_bn3_weight[]={5246720,5248767,}; int RN50_layer2__modules_3_bn3_weight[] = { 5246720,5248767 };
int RN50_layer2__modules_3_bn3_bias[]={5248768,5250815,}; int RN50_layer2__modules_3_bn3_bias[] = { 5248768,5250815 };
int RN50_layer3__modules_0_conv1_weight[]={5250816,5775103,}; int RN50_layer3__modules_0_conv1_weight[] = { 5250816,5775103 };
int RN50_layer3__modules_0_bn1_running_mean[]={5775104,5776127,}; int RN50_layer3__modules_0_bn1_running_mean[] = { 5775104,5776127 };
int RN50_layer3__modules_0_bn1_running_var[]={5776128,5777151,}; int RN50_layer3__modules_0_bn1_running_var[] = { 5776128,5777151 };
int RN50_layer3__modules_0_bn1_weight[]={5777152,5778175,}; int RN50_layer3__modules_0_bn1_weight[] = { 5777152,5778175 };
int RN50_layer3__modules_0_bn1_bias[]={5778176,5779199,}; int RN50_layer3__modules_0_bn1_bias[] = { 5778176,5779199 };
int RN50_layer3__modules_0_conv2_weight[]={5779200,8138495,}; int RN50_layer3__modules_0_conv2_weight[] = { 5779200,8138495 };
int RN50_layer3__modules_0_bn2_running_mean[]={8138496,8139519,}; int RN50_layer3__modules_0_bn2_running_mean[] = { 8138496,8139519 };
int RN50_layer3__modules_0_bn2_running_var[]={8139520,8140543,}; int RN50_layer3__modules_0_bn2_running_var[] = { 8139520,8140543 };
int RN50_layer3__modules_0_bn2_weight[]={8140544,8141567,}; int RN50_layer3__modules_0_bn2_weight[] = { 8140544,8141567 };
int RN50_layer3__modules_0_bn2_bias[]={8141568,8142591,}; int RN50_layer3__modules_0_bn2_bias[] = { 8141568,8142591 };
int RN50_layer3__modules_0_conv3_weight[]={8142592,9191167,}; int RN50_layer3__modules_0_conv3_weight[] = { 8142592,9191167 };
int RN50_layer3__modules_0_bn3_running_mean[]={9191168,9195263,}; int RN50_layer3__modules_0_bn3_running_mean[] = { 9191168,9195263 };
int RN50_layer3__modules_0_bn3_running_var[]={9195264,9199359,}; int RN50_layer3__modules_0_bn3_running_var[] = { 9195264,9199359 };
int RN50_layer3__modules_0_bn3_weight[]={9199360,9203455,}; int RN50_layer3__modules_0_bn3_weight[] = { 9199360,9203455 };
int RN50_layer3__modules_0_bn3_bias[]={9203456,9207551,}; int RN50_layer3__modules_0_bn3_bias[] = { 9203456,9207551 };
int RN50_layer3__modules_0_downsample__modules_0_weight[]={9207552,11304703,}; int RN50_layer3__modules_0_downsample__modules_0_weight[] = { 9207552,11304703 };
int RN50_layer3__modules_0_downsample__modules_1_running_mean[]={11304704,11308799,}; int RN50_layer3__modules_0_downsample__modules_1_running_mean[] = { 11304704,11308799 };
int RN50_layer3__modules_0_downsample__modules_1_running_var[]={11308800,11312895,}; int RN50_layer3__modules_0_downsample__modules_1_running_var[] = { 11308800,11312895 };
int RN50_layer3__modules_0_downsample__modules_1_weight[]={11312896,11316991,}; int RN50_layer3__modules_0_downsample__modules_1_weight[] = { 11312896,11316991 };
int RN50_layer3__modules_0_downsample__modules_1_bias[]={11316992,11321087,}; int RN50_layer3__modules_0_downsample__modules_1_bias[] = { 11316992,11321087 };
int RN50_layer3__modules_1_conv1_weight[]={11321088,12369663,}; int RN50_layer3__modules_1_conv1_weight[] = { 11321088,12369663 };
int RN50_layer3__modules_1_bn1_running_mean[]={12369664,12370687,}; int RN50_layer3__modules_1_bn1_running_mean[] = { 12369664,12370687 };
int RN50_layer3__modules_1_bn1_running_var[]={12370688,12371711,}; int RN50_layer3__modules_1_bn1_running_var[] = { 12370688,12371711 };
int RN50_layer3__modules_1_bn1_weight[]={12371712,12372735,}; int RN50_layer3__modules_1_bn1_weight[] = { 12371712,12372735 };
int RN50_layer3__modules_1_bn1_bias[]={12372736,12373759,}; int RN50_layer3__modules_1_bn1_bias[] = { 12372736,12373759 };
int RN50_layer3__modules_1_conv2_weight[]={12373760,14733055,}; int RN50_layer3__modules_1_conv2_weight[] = { 12373760,14733055 };
int RN50_layer3__modules_1_bn2_running_mean[]={14733056,14734079,}; int RN50_layer3__modules_1_bn2_running_mean[] = { 14733056,14734079 };
int RN50_layer3__modules_1_bn2_running_var[]={14734080,14735103,}; int RN50_layer3__modules_1_bn2_running_var[] = { 14734080,14735103 };
int RN50_layer3__modules_1_bn2_weight[]={14735104,14736127,}; int RN50_layer3__modules_1_bn2_weight[] = { 14735104,14736127 };
int RN50_layer3__modules_1_bn2_bias[]={14736128,14737151,}; int RN50_layer3__modules_1_bn2_bias[] = { 14736128,14737151 };
int RN50_layer3__modules_1_conv3_weight[]={14737152,15785727,}; int RN50_layer3__modules_1_conv3_weight[] = { 14737152,15785727 };
int RN50_layer3__modules_1_bn3_running_mean[]={15785728,15789823,}; int RN50_layer3__modules_1_bn3_running_mean[] = { 15785728,15789823 };
int RN50_layer3__modules_1_bn3_running_var[]={15789824,15793919,}; int RN50_layer3__modules_1_bn3_running_var[] = { 15789824,15793919 };
int RN50_layer3__modules_1_bn3_weight[]={15793920,15798015,}; int RN50_layer3__modules_1_bn3_weight[] = { 15793920,15798015 };
int RN50_layer3__modules_1_bn3_bias[]={15798016,15802111,}; int RN50_layer3__modules_1_bn3_bias[] = { 15798016,15802111 };
int RN50_layer3__modules_2_conv1_weight[]={15802112,16850687,}; int RN50_layer3__modules_2_conv1_weight[] = { 15802112,16850687 };
int RN50_layer3__modules_2_bn1_running_mean[]={16850688,16851711,}; int RN50_layer3__modules_2_bn1_running_mean[] = { 16850688,16851711 };
int RN50_layer3__modules_2_bn1_running_var[]={16851712,16852735,}; int RN50_layer3__modules_2_bn1_running_var[] = { 16851712,16852735 };
int RN50_layer3__modules_2_bn1_weight[]={16852736,16853759,}; int RN50_layer3__modules_2_bn1_weight[] = { 16852736,16853759 };
int RN50_layer3__modules_2_bn1_bias[]={16853760,16854783,}; int RN50_layer3__modules_2_bn1_bias[] = { 16853760,16854783 };
int RN50_layer3__modules_2_conv2_weight[]={16854784,19214079,}; int RN50_layer3__modules_2_conv2_weight[] = { 16854784,19214079 };
int RN50_layer3__modules_2_bn2_running_mean[]={19214080,19215103,}; int RN50_layer3__modules_2_bn2_running_mean[] = { 19214080,19215103 };
int RN50_layer3__modules_2_bn2_running_var[]={19215104,19216127,}; int RN50_layer3__modules_2_bn2_running_var[] = { 19215104,19216127 };
int RN50_layer3__modules_2_bn2_weight[]={19216128,19217151,}; int RN50_layer3__modules_2_bn2_weight[] = { 19216128,19217151 };
int RN50_layer3__modules_2_bn2_bias[]={19217152,19218175,}; int RN50_layer3__modules_2_bn2_bias[] = { 19217152,19218175 };
int RN50_layer3__modules_2_conv3_weight[]={19218176,20266751,}; int RN50_layer3__modules_2_conv3_weight[] = { 19218176,20266751 };
int RN50_layer3__modules_2_bn3_running_mean[]={20266752,20270847,}; int RN50_layer3__modules_2_bn3_running_mean[] = { 20266752,20270847 };
int RN50_layer3__modules_2_bn3_running_var[]={20270848,20274943,}; int RN50_layer3__modules_2_bn3_running_var[] = { 20270848,20274943 };
int RN50_layer3__modules_2_bn3_weight[]={20274944,20279039,}; int RN50_layer3__modules_2_bn3_weight[] = { 20274944,20279039 };
int RN50_layer3__modules_2_bn3_bias[]={20279040,20283135,}; int RN50_layer3__modules_2_bn3_bias[] = { 20279040,20283135 };
int RN50_layer3__modules_3_conv1_weight[]={20283136,21331711,}; int RN50_layer3__modules_3_conv1_weight[] = { 20283136,21331711 };
int RN50_layer3__modules_3_bn1_running_mean[]={21331712,21332735,}; int RN50_layer3__modules_3_bn1_running_mean[] = { 21331712,21332735 };
int RN50_layer3__modules_3_bn1_running_var[]={21332736,21333759,}; int RN50_layer3__modules_3_bn1_running_var[] = { 21332736,21333759 };
int RN50_layer3__modules_3_bn1_weight[]={21333760,21334783,}; int RN50_layer3__modules_3_bn1_weight[] = { 21333760,21334783 };
int RN50_layer3__modules_3_bn1_bias[]={21334784,21335807,}; int RN50_layer3__modules_3_bn1_bias[] = { 21334784,21335807 };
int RN50_layer3__modules_3_conv2_weight[]={21335808,23695103,}; int RN50_layer3__modules_3_conv2_weight[] = { 21335808,23695103 };
int RN50_layer3__modules_3_bn2_running_mean[]={23695104,23696127,}; int RN50_layer3__modules_3_bn2_running_mean[] = { 23695104,23696127 };
int RN50_layer3__modules_3_bn2_running_var[]={23696128,23697151,}; int RN50_layer3__modules_3_bn2_running_var[] = { 23696128,23697151 };
int RN50_layer3__modules_3_bn2_weight[]={23697152,23698175,}; int RN50_layer3__modules_3_bn2_weight[] = { 23697152,23698175 };
int RN50_layer3__modules_3_bn2_bias[]={23698176,23699199,}; int RN50_layer3__modules_3_bn2_bias[] = { 23698176,23699199 };
int RN50_layer3__modules_3_conv3_weight[]={23699200,24747775,}; int RN50_layer3__modules_3_conv3_weight[] = { 23699200,24747775 };
int RN50_layer3__modules_3_bn3_running_mean[]={24747776,24751871,}; int RN50_layer3__modules_3_bn3_running_mean[] = { 24747776,24751871 };
int RN50_layer3__modules_3_bn3_running_var[]={24751872,24755967,}; int RN50_layer3__modules_3_bn3_running_var[] = { 24751872,24755967 };
int RN50_layer3__modules_3_bn3_weight[]={24755968,24760063,}; int RN50_layer3__modules_3_bn3_weight[] = { 24755968,24760063 };
int RN50_layer3__modules_3_bn3_bias[]={24760064,24764159,}; int RN50_layer3__modules_3_bn3_bias[] = { 24760064,24764159 };
int RN50_layer3__modules_4_conv1_weight[]={24764160,25812735,}; int RN50_layer3__modules_4_conv1_weight[] = { 24764160,25812735 };
int RN50_layer3__modules_4_bn1_running_mean[]={25812736,25813759,}; int RN50_layer3__modules_4_bn1_running_mean[] = { 25812736,25813759 };
int RN50_layer3__modules_4_bn1_running_var[]={25813760,25814783,}; int RN50_layer3__modules_4_bn1_running_var[] = { 25813760,25814783 };
int RN50_layer3__modules_4_bn1_weight[]={25814784,25815807,}; int RN50_layer3__modules_4_bn1_weight[] = { 25814784,25815807 };
int RN50_layer3__modules_4_bn1_bias[]={25815808,25816831,}; int RN50_layer3__modules_4_bn1_bias[] = { 25815808,25816831 };
int RN50_layer3__modules_4_conv2_weight[]={25816832,28176127,}; int RN50_layer3__modules_4_conv2_weight[] = { 25816832,28176127 };
int RN50_layer3__modules_4_bn2_running_mean[]={28176128,28177151,}; int RN50_layer3__modules_4_bn2_running_mean[] = { 28176128,28177151 };
int RN50_layer3__modules_4_bn2_running_var[]={28177152,28178175,}; int RN50_layer3__modules_4_bn2_running_var[] = { 28177152,28178175 };
int RN50_layer3__modules_4_bn2_weight[]={28178176,28179199,}; int RN50_layer3__modules_4_bn2_weight[] = { 28178176,28179199 };
int RN50_layer3__modules_4_bn2_bias[]={28179200,28180223,}; int RN50_layer3__modules_4_bn2_bias[] = { 28179200,28180223 };
int RN50_layer3__modules_4_conv3_weight[]={28180224,29228799,}; int RN50_layer3__modules_4_conv3_weight[] = { 28180224,29228799 };
int RN50_layer3__modules_4_bn3_running_mean[]={29228800,29232895,}; int RN50_layer3__modules_4_bn3_running_mean[] = { 29228800,29232895 };
int RN50_layer3__modules_4_bn3_running_var[]={29232896,29236991,}; int RN50_layer3__modules_4_bn3_running_var[] = { 29232896,29236991 };
int RN50_layer3__modules_4_bn3_weight[]={29236992,29241087,}; int RN50_layer3__modules_4_bn3_weight[] = { 29236992,29241087 };
int RN50_layer3__modules_4_bn3_bias[]={29241088,29245183,}; int RN50_layer3__modules_4_bn3_bias[] = { 29241088,29245183 };
int RN50_layer3__modules_5_conv1_weight[]={29245184,30293759,}; int RN50_layer3__modules_5_conv1_weight[] = { 29245184,30293759 };
int RN50_layer3__modules_5_bn1_running_mean[]={30293760,30294783,}; int RN50_layer3__modules_5_bn1_running_mean[] = { 30293760,30294783 };
int RN50_layer3__modules_5_bn1_running_var[]={30294784,30295807,}; int RN50_layer3__modules_5_bn1_running_var[] = { 30294784,30295807 };
int RN50_layer3__modules_5_bn1_weight[]={30295808,30296831,}; int RN50_layer3__modules_5_bn1_weight[] = { 30295808,30296831 };
int RN50_layer3__modules_5_bn1_bias[]={30296832,30297855,}; int RN50_layer3__modules_5_bn1_bias[] = { 30296832,30297855 };
int RN50_layer3__modules_5_conv2_weight[]={30297856,32657151,}; int RN50_layer3__modules_5_conv2_weight[] = { 30297856,32657151 };
int RN50_layer3__modules_5_bn2_running_mean[]={32657152,32658175,}; int RN50_layer3__modules_5_bn2_running_mean[] = { 32657152,32658175 };
int RN50_layer3__modules_5_bn2_running_var[]={32658176,32659199,}; int RN50_layer3__modules_5_bn2_running_var[] = { 32658176,32659199 };
int RN50_layer3__modules_5_bn2_weight[]={32659200,32660223,}; int RN50_layer3__modules_5_bn2_weight[] = { 32659200,32660223 };
int RN50_layer3__modules_5_bn2_bias[]={32660224,32661247,}; int RN50_layer3__modules_5_bn2_bias[] = { 32660224,32661247 };
int RN50_layer3__modules_5_conv3_weight[]={32661248,33709823,}; int RN50_layer3__modules_5_conv3_weight[] = { 32661248,33709823 };
int RN50_layer3__modules_5_bn3_running_mean[]={33709824,33713919,}; int RN50_layer3__modules_5_bn3_running_mean[] = { 33709824,33713919 };
int RN50_layer3__modules_5_bn3_running_var[]={33713920,33718015,}; int RN50_layer3__modules_5_bn3_running_var[] = { 33713920,33718015 };
int RN50_layer3__modules_5_bn3_weight[]={33718016,33722111,}; int RN50_layer3__modules_5_bn3_weight[] = { 33718016,33722111 };
int RN50_layer3__modules_5_bn3_bias[]={33722112,33726207,}; int RN50_layer3__modules_5_bn3_bias[] = { 33722112,33726207 };
int RN50_layer4__modules_0_conv1_weight[]={33726208,35823359,}; int RN50_layer4__modules_0_conv1_weight[] = { 33726208,35823359 };
int RN50_layer4__modules_0_bn1_running_mean[]={35823360,35825407,}; int RN50_layer4__modules_0_bn1_running_mean[] = { 35823360,35825407 };
int RN50_layer4__modules_0_bn1_running_var[]={35825408,35827455,}; int RN50_layer4__modules_0_bn1_running_var[] = { 35825408,35827455 };
int RN50_layer4__modules_0_bn1_weight[]={35827456,35829503,}; int RN50_layer4__modules_0_bn1_weight[] = { 35827456,35829503 };
int RN50_layer4__modules_0_bn1_bias[]={35829504,35831551,}; int RN50_layer4__modules_0_bn1_bias[] = { 35829504,35831551 };
int RN50_layer4__modules_0_conv2_weight[]={35831552,45268735,}; int RN50_layer4__modules_0_conv2_weight[] = { 35831552,45268735 };
int RN50_layer4__modules_0_bn2_running_mean[]={45268736,45270783,}; int RN50_layer4__modules_0_bn2_running_mean[] = { 45268736,45270783 };
int RN50_layer4__modules_0_bn2_running_var[]={45270784,45272831,}; int RN50_layer4__modules_0_bn2_running_var[] = { 45270784,45272831 };
int RN50_layer4__modules_0_bn2_weight[]={45272832,45274879,}; int RN50_layer4__modules_0_bn2_weight[] = { 45272832,45274879 };
int RN50_layer4__modules_0_bn2_bias[]={45274880,45276927,}; int RN50_layer4__modules_0_bn2_bias[] = { 45274880,45276927 };
int RN50_layer4__modules_0_conv3_weight[]={45276928,49471231,}; int RN50_layer4__modules_0_conv3_weight[] = { 45276928,49471231 };
int RN50_layer4__modules_0_bn3_running_mean[]={49471232,49479423,}; int RN50_layer4__modules_0_bn3_running_mean[] = { 49471232,49479423 };
int RN50_layer4__modules_0_bn3_running_var[]={49479424,49487615,}; int RN50_layer4__modules_0_bn3_running_var[] = { 49479424,49487615 };
int RN50_layer4__modules_0_bn3_weight[]={49487616,49495807,}; int RN50_layer4__modules_0_bn3_weight[] = { 49487616,49495807 };
int RN50_layer4__modules_0_bn3_bias[]={49495808,49503999,}; int RN50_layer4__modules_0_bn3_bias[] = { 49495808,49503999 };
int RN50_layer4__modules_0_downsample__modules_0_weight[]={49504000,57892607,}; int RN50_layer4__modules_0_downsample__modules_0_weight[] = { 49504000,57892607 };
int RN50_layer4__modules_0_downsample__modules_1_running_mean[]={57892608,57900799,}; int RN50_layer4__modules_0_downsample__modules_1_running_mean[] = { 57892608,57900799 };
int RN50_layer4__modules_0_downsample__modules_1_running_var[]={57900800,57908991,}; int RN50_layer4__modules_0_downsample__modules_1_running_var[] = { 57900800,57908991 };
int RN50_layer4__modules_0_downsample__modules_1_weight[]={57908992,57917183,}; int RN50_layer4__modules_0_downsample__modules_1_weight[] = { 57908992,57917183 };
int RN50_layer4__modules_0_downsample__modules_1_bias[]={57917184,57925375,}; int RN50_layer4__modules_0_downsample__modules_1_bias[] = { 57917184,57925375 };
int RN50_layer4__modules_1_conv1_weight[]={57925376,62119679,}; int RN50_layer4__modules_1_conv1_weight[] = { 57925376,62119679 };
int RN50_layer4__modules_1_bn1_running_mean[]={62119680,62121727,}; int RN50_layer4__modules_1_bn1_running_mean[] = { 62119680,62121727 };
int RN50_layer4__modules_1_bn1_running_var[]={62121728,62123775,}; int RN50_layer4__modules_1_bn1_running_var[] = { 62121728,62123775 };
int RN50_layer4__modules_1_bn1_weight[]={62123776,62125823,}; int RN50_layer4__modules_1_bn1_weight[] = { 62123776,62125823 };
int RN50_layer4__modules_1_bn1_bias[]={62125824,62127871,}; int RN50_layer4__modules_1_bn1_bias[] = { 62125824,62127871 };
int RN50_layer4__modules_1_conv2_weight[]={62127872,71565055,}; int RN50_layer4__modules_1_conv2_weight[] = { 62127872,71565055 };
int RN50_layer4__modules_1_bn2_running_mean[]={71565056,71567103,}; int RN50_layer4__modules_1_bn2_running_mean[] = { 71565056,71567103 };
int RN50_layer4__modules_1_bn2_running_var[]={71567104,71569151,}; int RN50_layer4__modules_1_bn2_running_var[] = { 71567104,71569151 };
int RN50_layer4__modules_1_bn2_weight[]={71569152,71571199,}; int RN50_layer4__modules_1_bn2_weight[] = { 71569152,71571199 };
int RN50_layer4__modules_1_bn2_bias[]={71571200,71573247,}; int RN50_layer4__modules_1_bn2_bias[] = { 71571200,71573247 };
int RN50_layer4__modules_1_conv3_weight[]={71573248,75767551,}; int RN50_layer4__modules_1_conv3_weight[] = { 71573248,75767551 };
int RN50_layer4__modules_1_bn3_running_mean[]={75767552,75775743,}; int RN50_layer4__modules_1_bn3_running_mean[] = { 75767552,75775743 };
int RN50_layer4__modules_1_bn3_running_var[]={75775744,75783935,}; int RN50_layer4__modules_1_bn3_running_var[] = { 75775744,75783935 };
int RN50_layer4__modules_1_bn3_weight[]={75783936,75792127,}; int RN50_layer4__modules_1_bn3_weight[] = { 75783936,75792127 };
int RN50_layer4__modules_1_bn3_bias[]={75792128,75800319,}; int RN50_layer4__modules_1_bn3_bias[] = { 75792128,75800319 };
int RN50_layer4__modules_2_conv1_weight[]={75800320,79994623,}; int RN50_layer4__modules_2_conv1_weight[] = { 75800320,79994623 };
int RN50_layer4__modules_2_bn1_running_mean[]={79994624,79996671,}; int RN50_layer4__modules_2_bn1_running_mean[] = { 79994624,79996671 };
int RN50_layer4__modules_2_bn1_running_var[]={79996672,79998719,}; int RN50_layer4__modules_2_bn1_running_var[] = { 79996672,79998719 };
int RN50_layer4__modules_2_bn1_weight[]={79998720,80000767,}; int RN50_layer4__modules_2_bn1_weight[] = { 79998720,80000767 };
int RN50_layer4__modules_2_bn1_bias[]={80000768,80002815,}; int RN50_layer4__modules_2_bn1_bias[] = { 80000768,80002815 };
int RN50_layer4__modules_2_conv2_weight[]={80002816,89439999,}; int RN50_layer4__modules_2_conv2_weight[] = { 80002816,89439999 };
int RN50_layer4__modules_2_bn2_running_mean[]={89440000,89442047,}; int RN50_layer4__modules_2_bn2_running_mean[] = { 89440000,89442047 };
int RN50_layer4__modules_2_bn2_running_var[]={89442048,89444095,}; int RN50_layer4__modules_2_bn2_running_var[] = { 89442048,89444095 };
int RN50_layer4__modules_2_bn2_weight[]={89444096,89446143,}; int RN50_layer4__modules_2_bn2_weight[] = { 89444096,89446143 };
int RN50_layer4__modules_2_bn2_bias[]={89446144,89448191,}; int RN50_layer4__modules_2_bn2_bias[] = { 89446144,89448191 };
int RN50_layer4__modules_2_conv3_weight[]={89448192,93642495,}; int RN50_layer4__modules_2_conv3_weight[] = { 89448192,93642495 };
int RN50_layer4__modules_2_bn3_running_mean[]={93642496,93650687,}; int RN50_layer4__modules_2_bn3_running_mean[] = { 93642496,93650687 };
int RN50_layer4__modules_2_bn3_running_var[]={93650688,93658879,}; int RN50_layer4__modules_2_bn3_running_var[] = { 93650688,93658879 };
int RN50_layer4__modules_2_bn3_weight[]={93658880,93667071,}; int RN50_layer4__modules_2_bn3_weight[] = { 93658880,93667071 };
int RN50_layer4__modules_2_bn3_bias[]={93667072,93675263,}; int RN50_layer4__modules_2_bn3_bias[] = { 93667072,93675263 };
int RN50_fc_weight[]={93675264,101867263,}; int RN50_fc_weight[] = { 93675264,101867263 };
int RN50_fc_bias[]={101867264,101871263,}; int RN50_fc_bias[] = { 101867264,101871263 };
int input_0[]={101871264,102473375,}; int verify_input[] = { 101871264,102473375 };
int output_0[]={102473376,102477375,}; int verify_conv1[] = { 102473376,105684639 };
int input_1[]={102477376,103079487,}; int verify_bn1[] = { 105684640,108895903 };
int output_1[]={103079488,103083487,}; int verify_relu[] = { 108895904,112107167 };
int input_2[]={103083488,103685599,}; int verify_maxpool[] = { 112107168,112909983 };
int output_2[]={103685600,103689599,}; int verify_layer1[] = { 112909984,116121247 };
int input_3[]={103689600,104291711,}; int verify_layer2[] = { 116121248,117726879 };
int output_3[]={104291712,104295711,}; int verify_layer3[] = { 117726880,118529695 };
int input_4[]={104295712,104897823,}; int verify_layer4[] = { 118529696,118931103 };
int output_4[]={104897824,104901823,}; int verify_avgpool[] = { 118931104,118939295 };
int input_5[]={104901824,105503935,}; int verify_fc[] = { 118939296,118943295 };
int output_5[]={105503936,105507935,}; int input_0[] = { 118943296,119545407 };
int input_6[]={105507936,106110047,}; int output_0[] = { 119545408,119549407 };
int output_6[]={106110048,106114047,}; int input_1[] = { 119549408,120151519 };
int input_7[]={106114048,106716159,}; int output_1[] = { 120151520,120155519 };
int output_7[]={106716160,106720159,}; int input_2[] = { 120155520,120757631 };
int input_8[]={106720160,107322271,}; int output_2[] = { 120757632,120761631 };
int output_8[]={107322272,107326271,}; int input_3[] = { 120761632,121363743 };
int input_9[]={107326272,107928383,}; int output_3[] = { 121363744,121367743 };
int output_9[]={107928384,107932383,}; int input_4[] = { 121367744,121969855 };
int output_4[] = { 121969856,121973855 };
int input_5[] = { 121973856,122575967 };
int output_5[] = { 122575968,122579967 };
int input_6[] = { 122579968,123182079 };
int output_6[] = { 123182080,123186079 };
int input_7[] = { 123186080,123788191 };
int output_7[] = { 123788192,123792191 };
int input_8[] = { 123792192,124394303 };
int output_8[] = { 124394304,124398303 };
int input_9[] = { 124398304,125000415 };
int output_9[] = { 125000416,125004415 };

View File

@ -211,6 +211,19 @@ binaryfile = open(CurrentPath+'ResNet50Weight.bin', 'wb')
currentbyte = 0 currentbyte = 0
def genData(name, data, currentbyte, binaryfile, strg):
strg = strg + "int "+name+"[] = { "
array = data.cpu().detach().numpy().reshape(-1)
strg += str(currentbyte) + ","
for a in array:
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1)
strg = strg + " };\n"
return (currentbyte,binaryfile,strg)
def printDick(d, head, obj): def printDick(d, head, obj):
global currentbyte global currentbyte
global binaryfile global binaryfile
@ -226,77 +239,24 @@ def printDick(d, head, obj):
if objsub == '': if objsub == '':
objsub = obj[item] objsub = obj[item]
if d[item] == "Conv2d": if d[item] == "Conv2d":
strg = strg + "int "+head+"_"+item+"_weight[]={" currentbyte, binaryfile, strg = genData(
array = objsub.weight.cpu().detach().numpy().reshape(-1) head+"_"+item+"_weight", objsub.weight, currentbyte, binaryfile, strg)
strg += str(currentbyte) + ","
for a in array:
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1) + ","
strg = strg + "};\n"
if d[item] == "BatchNorm2d": if d[item] == "BatchNorm2d":
strg = strg + "int "+head+"_"+item+"_running_mean[]={" currentbyte, binaryfile, strg = genData(
array = objsub.running_mean.cpu().detach().numpy().reshape(-1) head+"_"+item+"_running_mean", objsub.running_mean, currentbyte, binaryfile, strg)
strg += str(currentbyte) + "," currentbyte, binaryfile, strg = genData(
for a in array: head+"_"+item+"_running_var", objsub.running_var, currentbyte, binaryfile, strg)
bs = struct.pack("f", a) currentbyte, binaryfile, strg = genData(
binaryfile.write(bs) head+"_"+item+"_weight", objsub.weight, currentbyte, binaryfile, strg)
currentbyte = currentbyte+4 currentbyte, binaryfile, strg = genData(
strg += str(currentbyte-1) + "," head+"_"+item+"_bias", objsub.bias, currentbyte, binaryfile, strg)
strg = strg + "};\n"
strg = strg + "int "+head+"_"+item+"_running_var[]={"
array = objsub.running_var.cpu().detach().numpy().reshape(-1)
strg += str(currentbyte) + ","
for a in array:
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1) + ","
strg = strg + "};\n"
strg = strg + "int "+head+"_"+item+"_weight[]={"
array = objsub.weight.cpu().detach().numpy().reshape(-1)
strg += str(currentbyte) + ","
for a in array:
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1) + ","
strg = strg + "};\n"
strg = strg + "int "+head+"_"+item+"_bias[]={"
array = objsub.bias.cpu().detach().numpy().reshape(-1)
strg += str(currentbyte) + ","
for a in array:
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1) + ","
strg = strg + "};\n"
if d[item] == "Linear": if d[item] == "Linear":
strg = strg + "int "+head+"_"+item+"_weight[]={" currentbyte, binaryfile, strg = genData(
array = objsub.weight.cpu().detach().numpy().reshape(-1) head+"_"+item+"_weight", objsub.weight, currentbyte, binaryfile, strg)
strg += str(currentbyte) + "," currentbyte, binaryfile, strg = genData(
for a in array: head+"_"+item+"_bias", objsub.bias, currentbyte, binaryfile, strg)
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1) + ","
strg = strg + "};\n"
strg = strg + "int "+head+"_"+item+"_bias[]={"
array = objsub.bias.cpu().detach().numpy().reshape(-1)
strg += str(currentbyte) + ","
for a in array:
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1) + ","
strg = strg + "};\n"
return strg return strg
@ -319,28 +279,36 @@ val_loader = torch.utils.data.DataLoader(
for batch_idx, (data, target) in enumerate(val_loader): for batch_idx, (data, target) in enumerate(val_loader):
currentbyte,binaryfile,strg = genData("verify_input", data, currentbyte, binaryfile, strg)
x = resnet50.conv1(data)
currentbyte,binaryfile,strg = genData("verify_conv1", x, currentbyte, binaryfile, strg)
x = resnet50.bn1(x)
currentbyte,binaryfile,strg = genData("verify_bn1", x, currentbyte, binaryfile, strg)
x = resnet50.relu(x)
currentbyte,binaryfile,strg = genData("verify_relu", x, currentbyte, binaryfile, strg)
x = resnet50.maxpool(x)
currentbyte,binaryfile,strg = genData("verify_maxpool", x, currentbyte, binaryfile, strg)
x = resnet50.layer1(x)
currentbyte,binaryfile,strg = genData("verify_layer1", x, currentbyte, binaryfile, strg)
x = resnet50.layer2(x)
currentbyte,binaryfile,strg = genData("verify_layer2", x, currentbyte, binaryfile, strg)
x = resnet50.layer3(x)
currentbyte,binaryfile,strg = genData("verify_layer3", x, currentbyte, binaryfile, strg)
x = resnet50.layer4(x)
currentbyte,binaryfile,strg = genData("verify_layer4", x, currentbyte, binaryfile, strg)
x = resnet50.avgpool(x)
currentbyte,binaryfile,strg = genData("verify_avgpool", x, currentbyte, binaryfile, strg)
x = torch.flatten(x, 1)
x = resnet50.fc(x)
currentbyte,binaryfile,strg = genData("verify_fc", x, currentbyte, binaryfile, strg)
break
strg = strg + "int input_"+str(batch_idx)+"[]={"
array = data.cpu().detach().numpy().reshape(-1)
strg += str(currentbyte) + ","
for a in array:
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1) + ","
strg = strg + "};\n"
for batch_idx, (data, target) in enumerate(val_loader):
currentbyte, binaryfile,strg = genData("input_"+str(batch_idx), data, currentbyte, binaryfile, strg)
out = resnet50(data) out = resnet50(data)
currentbyte, binaryfile, strg = genData(
strg = strg + "int output_"+str(batch_idx)+"[]={" "output_"+str(batch_idx), out, currentbyte, binaryfile, strg)
array = out.cpu().detach().numpy().reshape(-1)
strg += str(currentbyte) + ","
for a in array:
bs = struct.pack("f", a)
binaryfile.write(bs)
currentbyte = currentbyte+4
strg += str(currentbyte-1) + ","
strg = strg + "};\n"
weightfile.write(strg) weightfile.write(strg)