diff --git a/CNNDemo/CheckResnet50.py b/CNNDemo/CheckResnet50.py new file mode 100644 index 0000000..22047f4 --- /dev/null +++ b/CNNDemo/CheckResnet50.py @@ -0,0 +1,68 @@ +from __future__ import print_function + +import os +import sys +import torch +import torch.nn as nn +import torch.nn.functional as F +import torch.optim as optim +import torchvision +from torchvision import datasets, transforms +import torchvision.models as models +import matplotlib.pyplot as plt +import numpy as np +import struct +from struct import Struct + + + + +CurrentPath = os.path.split(os.path.realpath(__file__))[0]+"/" + +# resnet50 = models.resnet50(pretrained=True) +# torch.save(resnet50, CurrentPath+'params.pth') +resnet50 = torch.load(CurrentPath+'params.pth') +resnet50.eval() + + + + + + +weightfile = open(CurrentPath+'ResNet50Weight.cc', 'r') +binaryfile = open(CurrentPath+'ResNet50Weight.bin', 'rb') +bindata = binaryfile.read() + + + +def toNumpy(start, end): + global bindata + byte = [] + for i in range(start,end,4): + byte.append(struct.unpack("f", bindata[i:i+4])[0]) + return np.array(byte) + + + + + + + +weight = toNumpy(38656,55039) +inp = toNumpy(125573760,126376575) +outp = toNumpy(126376576,127179391) + +m = resnet50.layer1._modules['0'].conv1 + +weight = weight.reshape(m.weight.shape) +inp = inp.reshape(1, 64, 56, 56,) +outp = outp.reshape( 64, 56, 56,) + + +m.weight.data = torch.from_numpy(weight) +output = m(torch.from_numpy(inp)) + +output = output.cpu().detach().numpy() +print(output[0,0,:]) +print(outp[0,0,:]) +i = 0 \ No newline at end of file diff --git a/CNNDemo/ResNet50Weight.cc b/CNNDemo/ResNet50Weight.cc index 7c18f10..77981a9 100644 --- a/CNNDemo/ResNet50Weight.cc +++ b/CNNDemo/ResNet50Weight.cc @@ -1,338 +1,676 @@ int RN50_conv1_weight[] = { 0,37631 }; +int RN50_conv1_weight_shape[] = { 64, 3, 7, 7, }; int RN50_bn1_running_mean[] = { 37632,37887 }; +int RN50_bn1_running_mean_shape[] = { 64, }; int RN50_bn1_running_var[] = { 37888,38143 }; +int RN50_bn1_running_var_shape[] = { 64, }; int RN50_bn1_weight[] = { 38144,38399 }; +int RN50_bn1_weight_shape[] = { 64, }; int RN50_bn1_bias[] = { 38400,38655 }; +int RN50_bn1_bias_shape[] = { 64, }; int RN50_layer1__modules_0_conv1_weight[] = { 38656,55039 }; +int RN50_layer1__modules_0_conv1_weight_shape[] = { 64, 64, 1, 1, }; int RN50_layer1__modules_0_bn1_running_mean[] = { 55040,55295 }; +int RN50_layer1__modules_0_bn1_running_mean_shape[] = { 64, }; int RN50_layer1__modules_0_bn1_running_var[] = { 55296,55551 }; +int RN50_layer1__modules_0_bn1_running_var_shape[] = { 64, }; int RN50_layer1__modules_0_bn1_weight[] = { 55552,55807 }; +int RN50_layer1__modules_0_bn1_weight_shape[] = { 64, }; int RN50_layer1__modules_0_bn1_bias[] = { 55808,56063 }; +int RN50_layer1__modules_0_bn1_bias_shape[] = { 64, }; int RN50_layer1__modules_0_conv2_weight[] = { 56064,203519 }; +int RN50_layer1__modules_0_conv2_weight_shape[] = { 64, 64, 3, 3, }; int RN50_layer1__modules_0_bn2_running_mean[] = { 203520,203775 }; +int RN50_layer1__modules_0_bn2_running_mean_shape[] = { 64, }; int RN50_layer1__modules_0_bn2_running_var[] = { 203776,204031 }; +int RN50_layer1__modules_0_bn2_running_var_shape[] = { 64, }; int RN50_layer1__modules_0_bn2_weight[] = { 204032,204287 }; +int RN50_layer1__modules_0_bn2_weight_shape[] = { 64, }; int RN50_layer1__modules_0_bn2_bias[] = { 204288,204543 }; +int RN50_layer1__modules_0_bn2_bias_shape[] = { 64, }; int RN50_layer1__modules_0_conv3_weight[] = { 204544,270079 }; +int RN50_layer1__modules_0_conv3_weight_shape[] = { 256, 64, 1, 1, }; int RN50_layer1__modules_0_bn3_running_mean[] = { 270080,271103 }; +int RN50_layer1__modules_0_bn3_running_mean_shape[] = { 256, }; int RN50_layer1__modules_0_bn3_running_var[] = { 271104,272127 }; +int RN50_layer1__modules_0_bn3_running_var_shape[] = { 256, }; int RN50_layer1__modules_0_bn3_weight[] = { 272128,273151 }; +int RN50_layer1__modules_0_bn3_weight_shape[] = { 256, }; int RN50_layer1__modules_0_bn3_bias[] = { 273152,274175 }; +int RN50_layer1__modules_0_bn3_bias_shape[] = { 256, }; int RN50_layer1__modules_0_downsample__modules_0_weight[] = { 274176,339711 }; +int RN50_layer1__modules_0_downsample__modules_0_weight_shape[] = { 256, 64, 1, 1, }; int RN50_layer1__modules_0_downsample__modules_1_running_mean[] = { 339712,340735 }; +int RN50_layer1__modules_0_downsample__modules_1_running_mean_shape[] = { 256, }; int RN50_layer1__modules_0_downsample__modules_1_running_var[] = { 340736,341759 }; +int RN50_layer1__modules_0_downsample__modules_1_running_var_shape[] = { 256, }; int RN50_layer1__modules_0_downsample__modules_1_weight[] = { 341760,342783 }; +int RN50_layer1__modules_0_downsample__modules_1_weight_shape[] = { 256, }; int RN50_layer1__modules_0_downsample__modules_1_bias[] = { 342784,343807 }; +int RN50_layer1__modules_0_downsample__modules_1_bias_shape[] = { 256, }; int RN50_layer1__modules_1_conv1_weight[] = { 343808,409343 }; +int RN50_layer1__modules_1_conv1_weight_shape[] = { 64, 256, 1, 1, }; int RN50_layer1__modules_1_bn1_running_mean[] = { 409344,409599 }; +int RN50_layer1__modules_1_bn1_running_mean_shape[] = { 64, }; int RN50_layer1__modules_1_bn1_running_var[] = { 409600,409855 }; +int RN50_layer1__modules_1_bn1_running_var_shape[] = { 64, }; int RN50_layer1__modules_1_bn1_weight[] = { 409856,410111 }; +int RN50_layer1__modules_1_bn1_weight_shape[] = { 64, }; int RN50_layer1__modules_1_bn1_bias[] = { 410112,410367 }; +int RN50_layer1__modules_1_bn1_bias_shape[] = { 64, }; int RN50_layer1__modules_1_conv2_weight[] = { 410368,557823 }; +int RN50_layer1__modules_1_conv2_weight_shape[] = { 64, 64, 3, 3, }; int RN50_layer1__modules_1_bn2_running_mean[] = { 557824,558079 }; +int RN50_layer1__modules_1_bn2_running_mean_shape[] = { 64, }; int RN50_layer1__modules_1_bn2_running_var[] = { 558080,558335 }; +int RN50_layer1__modules_1_bn2_running_var_shape[] = { 64, }; int RN50_layer1__modules_1_bn2_weight[] = { 558336,558591 }; +int RN50_layer1__modules_1_bn2_weight_shape[] = { 64, }; int RN50_layer1__modules_1_bn2_bias[] = { 558592,558847 }; +int RN50_layer1__modules_1_bn2_bias_shape[] = { 64, }; int RN50_layer1__modules_1_conv3_weight[] = { 558848,624383 }; +int RN50_layer1__modules_1_conv3_weight_shape[] = { 256, 64, 1, 1, }; int RN50_layer1__modules_1_bn3_running_mean[] = { 624384,625407 }; +int RN50_layer1__modules_1_bn3_running_mean_shape[] = { 256, }; int RN50_layer1__modules_1_bn3_running_var[] = { 625408,626431 }; +int RN50_layer1__modules_1_bn3_running_var_shape[] = { 256, }; int RN50_layer1__modules_1_bn3_weight[] = { 626432,627455 }; +int RN50_layer1__modules_1_bn3_weight_shape[] = { 256, }; int RN50_layer1__modules_1_bn3_bias[] = { 627456,628479 }; +int RN50_layer1__modules_1_bn3_bias_shape[] = { 256, }; int RN50_layer1__modules_2_conv1_weight[] = { 628480,694015 }; +int RN50_layer1__modules_2_conv1_weight_shape[] = { 64, 256, 1, 1, }; int RN50_layer1__modules_2_bn1_running_mean[] = { 694016,694271 }; +int RN50_layer1__modules_2_bn1_running_mean_shape[] = { 64, }; int RN50_layer1__modules_2_bn1_running_var[] = { 694272,694527 }; +int RN50_layer1__modules_2_bn1_running_var_shape[] = { 64, }; int RN50_layer1__modules_2_bn1_weight[] = { 694528,694783 }; +int RN50_layer1__modules_2_bn1_weight_shape[] = { 64, }; int RN50_layer1__modules_2_bn1_bias[] = { 694784,695039 }; +int RN50_layer1__modules_2_bn1_bias_shape[] = { 64, }; int RN50_layer1__modules_2_conv2_weight[] = { 695040,842495 }; +int RN50_layer1__modules_2_conv2_weight_shape[] = { 64, 64, 3, 3, }; int RN50_layer1__modules_2_bn2_running_mean[] = { 842496,842751 }; +int RN50_layer1__modules_2_bn2_running_mean_shape[] = { 64, }; int RN50_layer1__modules_2_bn2_running_var[] = { 842752,843007 }; +int RN50_layer1__modules_2_bn2_running_var_shape[] = { 64, }; int RN50_layer1__modules_2_bn2_weight[] = { 843008,843263 }; +int RN50_layer1__modules_2_bn2_weight_shape[] = { 64, }; int RN50_layer1__modules_2_bn2_bias[] = { 843264,843519 }; +int RN50_layer1__modules_2_bn2_bias_shape[] = { 64, }; int RN50_layer1__modules_2_conv3_weight[] = { 843520,909055 }; +int RN50_layer1__modules_2_conv3_weight_shape[] = { 256, 64, 1, 1, }; int RN50_layer1__modules_2_bn3_running_mean[] = { 909056,910079 }; +int RN50_layer1__modules_2_bn3_running_mean_shape[] = { 256, }; int RN50_layer1__modules_2_bn3_running_var[] = { 910080,911103 }; +int RN50_layer1__modules_2_bn3_running_var_shape[] = { 256, }; int RN50_layer1__modules_2_bn3_weight[] = { 911104,912127 }; +int RN50_layer1__modules_2_bn3_weight_shape[] = { 256, }; int RN50_layer1__modules_2_bn3_bias[] = { 912128,913151 }; +int RN50_layer1__modules_2_bn3_bias_shape[] = { 256, }; int RN50_layer2__modules_0_conv1_weight[] = { 913152,1044223 }; +int RN50_layer2__modules_0_conv1_weight_shape[] = { 128, 256, 1, 1, }; int RN50_layer2__modules_0_bn1_running_mean[] = { 1044224,1044735 }; +int RN50_layer2__modules_0_bn1_running_mean_shape[] = { 128, }; int RN50_layer2__modules_0_bn1_running_var[] = { 1044736,1045247 }; +int RN50_layer2__modules_0_bn1_running_var_shape[] = { 128, }; int RN50_layer2__modules_0_bn1_weight[] = { 1045248,1045759 }; +int RN50_layer2__modules_0_bn1_weight_shape[] = { 128, }; int RN50_layer2__modules_0_bn1_bias[] = { 1045760,1046271 }; +int RN50_layer2__modules_0_bn1_bias_shape[] = { 128, }; int RN50_layer2__modules_0_conv2_weight[] = { 1046272,1636095 }; +int RN50_layer2__modules_0_conv2_weight_shape[] = { 128, 128, 3, 3, }; int RN50_layer2__modules_0_bn2_running_mean[] = { 1636096,1636607 }; +int RN50_layer2__modules_0_bn2_running_mean_shape[] = { 128, }; int RN50_layer2__modules_0_bn2_running_var[] = { 1636608,1637119 }; +int RN50_layer2__modules_0_bn2_running_var_shape[] = { 128, }; int RN50_layer2__modules_0_bn2_weight[] = { 1637120,1637631 }; +int RN50_layer2__modules_0_bn2_weight_shape[] = { 128, }; int RN50_layer2__modules_0_bn2_bias[] = { 1637632,1638143 }; +int RN50_layer2__modules_0_bn2_bias_shape[] = { 128, }; int RN50_layer2__modules_0_conv3_weight[] = { 1638144,1900287 }; +int RN50_layer2__modules_0_conv3_weight_shape[] = { 512, 128, 1, 1, }; int RN50_layer2__modules_0_bn3_running_mean[] = { 1900288,1902335 }; +int RN50_layer2__modules_0_bn3_running_mean_shape[] = { 512, }; int RN50_layer2__modules_0_bn3_running_var[] = { 1902336,1904383 }; +int RN50_layer2__modules_0_bn3_running_var_shape[] = { 512, }; int RN50_layer2__modules_0_bn3_weight[] = { 1904384,1906431 }; +int RN50_layer2__modules_0_bn3_weight_shape[] = { 512, }; int RN50_layer2__modules_0_bn3_bias[] = { 1906432,1908479 }; +int RN50_layer2__modules_0_bn3_bias_shape[] = { 512, }; int RN50_layer2__modules_0_downsample__modules_0_weight[] = { 1908480,2432767 }; +int RN50_layer2__modules_0_downsample__modules_0_weight_shape[] = { 512, 256, 1, 1, }; int RN50_layer2__modules_0_downsample__modules_1_running_mean[] = { 2432768,2434815 }; +int RN50_layer2__modules_0_downsample__modules_1_running_mean_shape[] = { 512, }; int RN50_layer2__modules_0_downsample__modules_1_running_var[] = { 2434816,2436863 }; +int RN50_layer2__modules_0_downsample__modules_1_running_var_shape[] = { 512, }; int RN50_layer2__modules_0_downsample__modules_1_weight[] = { 2436864,2438911 }; +int RN50_layer2__modules_0_downsample__modules_1_weight_shape[] = { 512, }; int RN50_layer2__modules_0_downsample__modules_1_bias[] = { 2438912,2440959 }; +int RN50_layer2__modules_0_downsample__modules_1_bias_shape[] = { 512, }; int RN50_layer2__modules_1_conv1_weight[] = { 2440960,2703103 }; +int RN50_layer2__modules_1_conv1_weight_shape[] = { 128, 512, 1, 1, }; int RN50_layer2__modules_1_bn1_running_mean[] = { 2703104,2703615 }; +int RN50_layer2__modules_1_bn1_running_mean_shape[] = { 128, }; int RN50_layer2__modules_1_bn1_running_var[] = { 2703616,2704127 }; +int RN50_layer2__modules_1_bn1_running_var_shape[] = { 128, }; int RN50_layer2__modules_1_bn1_weight[] = { 2704128,2704639 }; +int RN50_layer2__modules_1_bn1_weight_shape[] = { 128, }; int RN50_layer2__modules_1_bn1_bias[] = { 2704640,2705151 }; +int RN50_layer2__modules_1_bn1_bias_shape[] = { 128, }; int RN50_layer2__modules_1_conv2_weight[] = { 2705152,3294975 }; +int RN50_layer2__modules_1_conv2_weight_shape[] = { 128, 128, 3, 3, }; int RN50_layer2__modules_1_bn2_running_mean[] = { 3294976,3295487 }; +int RN50_layer2__modules_1_bn2_running_mean_shape[] = { 128, }; int RN50_layer2__modules_1_bn2_running_var[] = { 3295488,3295999 }; +int RN50_layer2__modules_1_bn2_running_var_shape[] = { 128, }; int RN50_layer2__modules_1_bn2_weight[] = { 3296000,3296511 }; +int RN50_layer2__modules_1_bn2_weight_shape[] = { 128, }; int RN50_layer2__modules_1_bn2_bias[] = { 3296512,3297023 }; +int RN50_layer2__modules_1_bn2_bias_shape[] = { 128, }; int RN50_layer2__modules_1_conv3_weight[] = { 3297024,3559167 }; +int RN50_layer2__modules_1_conv3_weight_shape[] = { 512, 128, 1, 1, }; int RN50_layer2__modules_1_bn3_running_mean[] = { 3559168,3561215 }; +int RN50_layer2__modules_1_bn3_running_mean_shape[] = { 512, }; int RN50_layer2__modules_1_bn3_running_var[] = { 3561216,3563263 }; +int RN50_layer2__modules_1_bn3_running_var_shape[] = { 512, }; int RN50_layer2__modules_1_bn3_weight[] = { 3563264,3565311 }; +int RN50_layer2__modules_1_bn3_weight_shape[] = { 512, }; int RN50_layer2__modules_1_bn3_bias[] = { 3565312,3567359 }; +int RN50_layer2__modules_1_bn3_bias_shape[] = { 512, }; int RN50_layer2__modules_2_conv1_weight[] = { 3567360,3829503 }; +int RN50_layer2__modules_2_conv1_weight_shape[] = { 128, 512, 1, 1, }; int RN50_layer2__modules_2_bn1_running_mean[] = { 3829504,3830015 }; +int RN50_layer2__modules_2_bn1_running_mean_shape[] = { 128, }; int RN50_layer2__modules_2_bn1_running_var[] = { 3830016,3830527 }; +int RN50_layer2__modules_2_bn1_running_var_shape[] = { 128, }; int RN50_layer2__modules_2_bn1_weight[] = { 3830528,3831039 }; +int RN50_layer2__modules_2_bn1_weight_shape[] = { 128, }; int RN50_layer2__modules_2_bn1_bias[] = { 3831040,3831551 }; +int RN50_layer2__modules_2_bn1_bias_shape[] = { 128, }; int RN50_layer2__modules_2_conv2_weight[] = { 3831552,4421375 }; +int RN50_layer2__modules_2_conv2_weight_shape[] = { 128, 128, 3, 3, }; int RN50_layer2__modules_2_bn2_running_mean[] = { 4421376,4421887 }; +int RN50_layer2__modules_2_bn2_running_mean_shape[] = { 128, }; int RN50_layer2__modules_2_bn2_running_var[] = { 4421888,4422399 }; +int RN50_layer2__modules_2_bn2_running_var_shape[] = { 128, }; int RN50_layer2__modules_2_bn2_weight[] = { 4422400,4422911 }; +int RN50_layer2__modules_2_bn2_weight_shape[] = { 128, }; int RN50_layer2__modules_2_bn2_bias[] = { 4422912,4423423 }; +int RN50_layer2__modules_2_bn2_bias_shape[] = { 128, }; int RN50_layer2__modules_2_conv3_weight[] = { 4423424,4685567 }; +int RN50_layer2__modules_2_conv3_weight_shape[] = { 512, 128, 1, 1, }; int RN50_layer2__modules_2_bn3_running_mean[] = { 4685568,4687615 }; +int RN50_layer2__modules_2_bn3_running_mean_shape[] = { 512, }; int RN50_layer2__modules_2_bn3_running_var[] = { 4687616,4689663 }; +int RN50_layer2__modules_2_bn3_running_var_shape[] = { 512, }; int RN50_layer2__modules_2_bn3_weight[] = { 4689664,4691711 }; +int RN50_layer2__modules_2_bn3_weight_shape[] = { 512, }; int RN50_layer2__modules_2_bn3_bias[] = { 4691712,4693759 }; +int RN50_layer2__modules_2_bn3_bias_shape[] = { 512, }; int RN50_layer2__modules_3_conv1_weight[] = { 4693760,4955903 }; +int RN50_layer2__modules_3_conv1_weight_shape[] = { 128, 512, 1, 1, }; int RN50_layer2__modules_3_bn1_running_mean[] = { 4955904,4956415 }; +int RN50_layer2__modules_3_bn1_running_mean_shape[] = { 128, }; int RN50_layer2__modules_3_bn1_running_var[] = { 4956416,4956927 }; +int RN50_layer2__modules_3_bn1_running_var_shape[] = { 128, }; int RN50_layer2__modules_3_bn1_weight[] = { 4956928,4957439 }; +int RN50_layer2__modules_3_bn1_weight_shape[] = { 128, }; int RN50_layer2__modules_3_bn1_bias[] = { 4957440,4957951 }; +int RN50_layer2__modules_3_bn1_bias_shape[] = { 128, }; int RN50_layer2__modules_3_conv2_weight[] = { 4957952,5547775 }; +int RN50_layer2__modules_3_conv2_weight_shape[] = { 128, 128, 3, 3, }; int RN50_layer2__modules_3_bn2_running_mean[] = { 5547776,5548287 }; +int RN50_layer2__modules_3_bn2_running_mean_shape[] = { 128, }; int RN50_layer2__modules_3_bn2_running_var[] = { 5548288,5548799 }; +int RN50_layer2__modules_3_bn2_running_var_shape[] = { 128, }; int RN50_layer2__modules_3_bn2_weight[] = { 5548800,5549311 }; +int RN50_layer2__modules_3_bn2_weight_shape[] = { 128, }; int RN50_layer2__modules_3_bn2_bias[] = { 5549312,5549823 }; +int RN50_layer2__modules_3_bn2_bias_shape[] = { 128, }; int RN50_layer2__modules_3_conv3_weight[] = { 5549824,5811967 }; +int RN50_layer2__modules_3_conv3_weight_shape[] = { 512, 128, 1, 1, }; int RN50_layer2__modules_3_bn3_running_mean[] = { 5811968,5814015 }; +int RN50_layer2__modules_3_bn3_running_mean_shape[] = { 512, }; int RN50_layer2__modules_3_bn3_running_var[] = { 5814016,5816063 }; +int RN50_layer2__modules_3_bn3_running_var_shape[] = { 512, }; int RN50_layer2__modules_3_bn3_weight[] = { 5816064,5818111 }; +int RN50_layer2__modules_3_bn3_weight_shape[] = { 512, }; int RN50_layer2__modules_3_bn3_bias[] = { 5818112,5820159 }; +int RN50_layer2__modules_3_bn3_bias_shape[] = { 512, }; int RN50_layer3__modules_0_conv1_weight[] = { 5820160,6344447 }; +int RN50_layer3__modules_0_conv1_weight_shape[] = { 256, 512, 1, 1, }; int RN50_layer3__modules_0_bn1_running_mean[] = { 6344448,6345471 }; +int RN50_layer3__modules_0_bn1_running_mean_shape[] = { 256, }; int RN50_layer3__modules_0_bn1_running_var[] = { 6345472,6346495 }; +int RN50_layer3__modules_0_bn1_running_var_shape[] = { 256, }; int RN50_layer3__modules_0_bn1_weight[] = { 6346496,6347519 }; +int RN50_layer3__modules_0_bn1_weight_shape[] = { 256, }; int RN50_layer3__modules_0_bn1_bias[] = { 6347520,6348543 }; +int RN50_layer3__modules_0_bn1_bias_shape[] = { 256, }; int RN50_layer3__modules_0_conv2_weight[] = { 6348544,8707839 }; +int RN50_layer3__modules_0_conv2_weight_shape[] = { 256, 256, 3, 3, }; int RN50_layer3__modules_0_bn2_running_mean[] = { 8707840,8708863 }; +int RN50_layer3__modules_0_bn2_running_mean_shape[] = { 256, }; int RN50_layer3__modules_0_bn2_running_var[] = { 8708864,8709887 }; +int RN50_layer3__modules_0_bn2_running_var_shape[] = { 256, }; int RN50_layer3__modules_0_bn2_weight[] = { 8709888,8710911 }; +int RN50_layer3__modules_0_bn2_weight_shape[] = { 256, }; int RN50_layer3__modules_0_bn2_bias[] = { 8710912,8711935 }; +int RN50_layer3__modules_0_bn2_bias_shape[] = { 256, }; int RN50_layer3__modules_0_conv3_weight[] = { 8711936,9760511 }; +int RN50_layer3__modules_0_conv3_weight_shape[] = { 1024, 256, 1, 1, }; int RN50_layer3__modules_0_bn3_running_mean[] = { 9760512,9764607 }; +int RN50_layer3__modules_0_bn3_running_mean_shape[] = { 1024, }; int RN50_layer3__modules_0_bn3_running_var[] = { 9764608,9768703 }; +int RN50_layer3__modules_0_bn3_running_var_shape[] = { 1024, }; int RN50_layer3__modules_0_bn3_weight[] = { 9768704,9772799 }; +int RN50_layer3__modules_0_bn3_weight_shape[] = { 1024, }; int RN50_layer3__modules_0_bn3_bias[] = { 9772800,9776895 }; +int RN50_layer3__modules_0_bn3_bias_shape[] = { 1024, }; int RN50_layer3__modules_0_downsample__modules_0_weight[] = { 9776896,11874047 }; +int RN50_layer3__modules_0_downsample__modules_0_weight_shape[] = { 1024, 512, 1, 1, }; int RN50_layer3__modules_0_downsample__modules_1_running_mean[] = { 11874048,11878143 }; +int RN50_layer3__modules_0_downsample__modules_1_running_mean_shape[] = { 1024, }; int RN50_layer3__modules_0_downsample__modules_1_running_var[] = { 11878144,11882239 }; +int RN50_layer3__modules_0_downsample__modules_1_running_var_shape[] = { 1024, }; int RN50_layer3__modules_0_downsample__modules_1_weight[] = { 11882240,11886335 }; +int RN50_layer3__modules_0_downsample__modules_1_weight_shape[] = { 1024, }; int RN50_layer3__modules_0_downsample__modules_1_bias[] = { 11886336,11890431 }; +int RN50_layer3__modules_0_downsample__modules_1_bias_shape[] = { 1024, }; int RN50_layer3__modules_1_conv1_weight[] = { 11890432,12939007 }; +int RN50_layer3__modules_1_conv1_weight_shape[] = { 256, 1024, 1, 1, }; int RN50_layer3__modules_1_bn1_running_mean[] = { 12939008,12940031 }; +int RN50_layer3__modules_1_bn1_running_mean_shape[] = { 256, }; int RN50_layer3__modules_1_bn1_running_var[] = { 12940032,12941055 }; +int RN50_layer3__modules_1_bn1_running_var_shape[] = { 256, }; int RN50_layer3__modules_1_bn1_weight[] = { 12941056,12942079 }; +int RN50_layer3__modules_1_bn1_weight_shape[] = { 256, }; int RN50_layer3__modules_1_bn1_bias[] = { 12942080,12943103 }; +int RN50_layer3__modules_1_bn1_bias_shape[] = { 256, }; int RN50_layer3__modules_1_conv2_weight[] = { 12943104,15302399 }; +int RN50_layer3__modules_1_conv2_weight_shape[] = { 256, 256, 3, 3, }; int RN50_layer3__modules_1_bn2_running_mean[] = { 15302400,15303423 }; +int RN50_layer3__modules_1_bn2_running_mean_shape[] = { 256, }; int RN50_layer3__modules_1_bn2_running_var[] = { 15303424,15304447 }; +int RN50_layer3__modules_1_bn2_running_var_shape[] = { 256, }; int RN50_layer3__modules_1_bn2_weight[] = { 15304448,15305471 }; +int RN50_layer3__modules_1_bn2_weight_shape[] = { 256, }; int RN50_layer3__modules_1_bn2_bias[] = { 15305472,15306495 }; +int RN50_layer3__modules_1_bn2_bias_shape[] = { 256, }; int RN50_layer3__modules_1_conv3_weight[] = { 15306496,16355071 }; +int RN50_layer3__modules_1_conv3_weight_shape[] = { 1024, 256, 1, 1, }; int RN50_layer3__modules_1_bn3_running_mean[] = { 16355072,16359167 }; +int RN50_layer3__modules_1_bn3_running_mean_shape[] = { 1024, }; int RN50_layer3__modules_1_bn3_running_var[] = { 16359168,16363263 }; +int RN50_layer3__modules_1_bn3_running_var_shape[] = { 1024, }; int RN50_layer3__modules_1_bn3_weight[] = { 16363264,16367359 }; +int RN50_layer3__modules_1_bn3_weight_shape[] = { 1024, }; int RN50_layer3__modules_1_bn3_bias[] = { 16367360,16371455 }; +int RN50_layer3__modules_1_bn3_bias_shape[] = { 1024, }; int RN50_layer3__modules_2_conv1_weight[] = { 16371456,17420031 }; +int RN50_layer3__modules_2_conv1_weight_shape[] = { 256, 1024, 1, 1, }; int RN50_layer3__modules_2_bn1_running_mean[] = { 17420032,17421055 }; +int RN50_layer3__modules_2_bn1_running_mean_shape[] = { 256, }; int RN50_layer3__modules_2_bn1_running_var[] = { 17421056,17422079 }; +int RN50_layer3__modules_2_bn1_running_var_shape[] = { 256, }; int RN50_layer3__modules_2_bn1_weight[] = { 17422080,17423103 }; +int RN50_layer3__modules_2_bn1_weight_shape[] = { 256, }; int RN50_layer3__modules_2_bn1_bias[] = { 17423104,17424127 }; +int RN50_layer3__modules_2_bn1_bias_shape[] = { 256, }; int RN50_layer3__modules_2_conv2_weight[] = { 17424128,19783423 }; +int RN50_layer3__modules_2_conv2_weight_shape[] = { 256, 256, 3, 3, }; int RN50_layer3__modules_2_bn2_running_mean[] = { 19783424,19784447 }; +int RN50_layer3__modules_2_bn2_running_mean_shape[] = { 256, }; int RN50_layer3__modules_2_bn2_running_var[] = { 19784448,19785471 }; +int RN50_layer3__modules_2_bn2_running_var_shape[] = { 256, }; int RN50_layer3__modules_2_bn2_weight[] = { 19785472,19786495 }; +int RN50_layer3__modules_2_bn2_weight_shape[] = { 256, }; int RN50_layer3__modules_2_bn2_bias[] = { 19786496,19787519 }; +int RN50_layer3__modules_2_bn2_bias_shape[] = { 256, }; int RN50_layer3__modules_2_conv3_weight[] = { 19787520,20836095 }; +int RN50_layer3__modules_2_conv3_weight_shape[] = { 1024, 256, 1, 1, }; int RN50_layer3__modules_2_bn3_running_mean[] = { 20836096,20840191 }; +int RN50_layer3__modules_2_bn3_running_mean_shape[] = { 1024, }; int RN50_layer3__modules_2_bn3_running_var[] = { 20840192,20844287 }; +int RN50_layer3__modules_2_bn3_running_var_shape[] = { 1024, }; int RN50_layer3__modules_2_bn3_weight[] = { 20844288,20848383 }; +int RN50_layer3__modules_2_bn3_weight_shape[] = { 1024, }; int RN50_layer3__modules_2_bn3_bias[] = { 20848384,20852479 }; +int RN50_layer3__modules_2_bn3_bias_shape[] = { 1024, }; int RN50_layer3__modules_3_conv1_weight[] = { 20852480,21901055 }; +int RN50_layer3__modules_3_conv1_weight_shape[] = { 256, 1024, 1, 1, }; int RN50_layer3__modules_3_bn1_running_mean[] = { 21901056,21902079 }; +int RN50_layer3__modules_3_bn1_running_mean_shape[] = { 256, }; int RN50_layer3__modules_3_bn1_running_var[] = { 21902080,21903103 }; +int RN50_layer3__modules_3_bn1_running_var_shape[] = { 256, }; int RN50_layer3__modules_3_bn1_weight[] = { 21903104,21904127 }; +int RN50_layer3__modules_3_bn1_weight_shape[] = { 256, }; int RN50_layer3__modules_3_bn1_bias[] = { 21904128,21905151 }; +int RN50_layer3__modules_3_bn1_bias_shape[] = { 256, }; int RN50_layer3__modules_3_conv2_weight[] = { 21905152,24264447 }; +int RN50_layer3__modules_3_conv2_weight_shape[] = { 256, 256, 3, 3, }; int RN50_layer3__modules_3_bn2_running_mean[] = { 24264448,24265471 }; +int RN50_layer3__modules_3_bn2_running_mean_shape[] = { 256, }; int RN50_layer3__modules_3_bn2_running_var[] = { 24265472,24266495 }; +int RN50_layer3__modules_3_bn2_running_var_shape[] = { 256, }; int RN50_layer3__modules_3_bn2_weight[] = { 24266496,24267519 }; +int RN50_layer3__modules_3_bn2_weight_shape[] = { 256, }; int RN50_layer3__modules_3_bn2_bias[] = { 24267520,24268543 }; +int RN50_layer3__modules_3_bn2_bias_shape[] = { 256, }; int RN50_layer3__modules_3_conv3_weight[] = { 24268544,25317119 }; +int RN50_layer3__modules_3_conv3_weight_shape[] = { 1024, 256, 1, 1, }; int RN50_layer3__modules_3_bn3_running_mean[] = { 25317120,25321215 }; +int RN50_layer3__modules_3_bn3_running_mean_shape[] = { 1024, }; int RN50_layer3__modules_3_bn3_running_var[] = { 25321216,25325311 }; +int RN50_layer3__modules_3_bn3_running_var_shape[] = { 1024, }; int RN50_layer3__modules_3_bn3_weight[] = { 25325312,25329407 }; +int RN50_layer3__modules_3_bn3_weight_shape[] = { 1024, }; int RN50_layer3__modules_3_bn3_bias[] = { 25329408,25333503 }; +int RN50_layer3__modules_3_bn3_bias_shape[] = { 1024, }; int RN50_layer3__modules_4_conv1_weight[] = { 25333504,26382079 }; +int RN50_layer3__modules_4_conv1_weight_shape[] = { 256, 1024, 1, 1, }; int RN50_layer3__modules_4_bn1_running_mean[] = { 26382080,26383103 }; +int RN50_layer3__modules_4_bn1_running_mean_shape[] = { 256, }; int RN50_layer3__modules_4_bn1_running_var[] = { 26383104,26384127 }; +int RN50_layer3__modules_4_bn1_running_var_shape[] = { 256, }; int RN50_layer3__modules_4_bn1_weight[] = { 26384128,26385151 }; +int RN50_layer3__modules_4_bn1_weight_shape[] = { 256, }; int RN50_layer3__modules_4_bn1_bias[] = { 26385152,26386175 }; +int RN50_layer3__modules_4_bn1_bias_shape[] = { 256, }; int RN50_layer3__modules_4_conv2_weight[] = { 26386176,28745471 }; +int RN50_layer3__modules_4_conv2_weight_shape[] = { 256, 256, 3, 3, }; int RN50_layer3__modules_4_bn2_running_mean[] = { 28745472,28746495 }; +int RN50_layer3__modules_4_bn2_running_mean_shape[] = { 256, }; int RN50_layer3__modules_4_bn2_running_var[] = { 28746496,28747519 }; +int RN50_layer3__modules_4_bn2_running_var_shape[] = { 256, }; int RN50_layer3__modules_4_bn2_weight[] = { 28747520,28748543 }; +int RN50_layer3__modules_4_bn2_weight_shape[] = { 256, }; int RN50_layer3__modules_4_bn2_bias[] = { 28748544,28749567 }; +int RN50_layer3__modules_4_bn2_bias_shape[] = { 256, }; int RN50_layer3__modules_4_conv3_weight[] = { 28749568,29798143 }; +int RN50_layer3__modules_4_conv3_weight_shape[] = { 1024, 256, 1, 1, }; int RN50_layer3__modules_4_bn3_running_mean[] = { 29798144,29802239 }; +int RN50_layer3__modules_4_bn3_running_mean_shape[] = { 1024, }; int RN50_layer3__modules_4_bn3_running_var[] = { 29802240,29806335 }; +int RN50_layer3__modules_4_bn3_running_var_shape[] = { 1024, }; int RN50_layer3__modules_4_bn3_weight[] = { 29806336,29810431 }; +int RN50_layer3__modules_4_bn3_weight_shape[] = { 1024, }; int RN50_layer3__modules_4_bn3_bias[] = { 29810432,29814527 }; +int RN50_layer3__modules_4_bn3_bias_shape[] = { 1024, }; int RN50_layer3__modules_5_conv1_weight[] = { 29814528,30863103 }; +int RN50_layer3__modules_5_conv1_weight_shape[] = { 256, 1024, 1, 1, }; int RN50_layer3__modules_5_bn1_running_mean[] = { 30863104,30864127 }; +int RN50_layer3__modules_5_bn1_running_mean_shape[] = { 256, }; int RN50_layer3__modules_5_bn1_running_var[] = { 30864128,30865151 }; +int RN50_layer3__modules_5_bn1_running_var_shape[] = { 256, }; int RN50_layer3__modules_5_bn1_weight[] = { 30865152,30866175 }; +int RN50_layer3__modules_5_bn1_weight_shape[] = { 256, }; int RN50_layer3__modules_5_bn1_bias[] = { 30866176,30867199 }; +int RN50_layer3__modules_5_bn1_bias_shape[] = { 256, }; int RN50_layer3__modules_5_conv2_weight[] = { 30867200,33226495 }; +int RN50_layer3__modules_5_conv2_weight_shape[] = { 256, 256, 3, 3, }; int RN50_layer3__modules_5_bn2_running_mean[] = { 33226496,33227519 }; +int RN50_layer3__modules_5_bn2_running_mean_shape[] = { 256, }; int RN50_layer3__modules_5_bn2_running_var[] = { 33227520,33228543 }; +int RN50_layer3__modules_5_bn2_running_var_shape[] = { 256, }; int RN50_layer3__modules_5_bn2_weight[] = { 33228544,33229567 }; +int RN50_layer3__modules_5_bn2_weight_shape[] = { 256, }; int RN50_layer3__modules_5_bn2_bias[] = { 33229568,33230591 }; +int RN50_layer3__modules_5_bn2_bias_shape[] = { 256, }; int RN50_layer3__modules_5_conv3_weight[] = { 33230592,34279167 }; +int RN50_layer3__modules_5_conv3_weight_shape[] = { 1024, 256, 1, 1, }; int RN50_layer3__modules_5_bn3_running_mean[] = { 34279168,34283263 }; +int RN50_layer3__modules_5_bn3_running_mean_shape[] = { 1024, }; int RN50_layer3__modules_5_bn3_running_var[] = { 34283264,34287359 }; +int RN50_layer3__modules_5_bn3_running_var_shape[] = { 1024, }; int RN50_layer3__modules_5_bn3_weight[] = { 34287360,34291455 }; +int RN50_layer3__modules_5_bn3_weight_shape[] = { 1024, }; int RN50_layer3__modules_5_bn3_bias[] = { 34291456,34295551 }; +int RN50_layer3__modules_5_bn3_bias_shape[] = { 1024, }; int RN50_layer4__modules_0_conv1_weight[] = { 34295552,36392703 }; +int RN50_layer4__modules_0_conv1_weight_shape[] = { 512, 1024, 1, 1, }; int RN50_layer4__modules_0_bn1_running_mean[] = { 36392704,36394751 }; +int RN50_layer4__modules_0_bn1_running_mean_shape[] = { 512, }; int RN50_layer4__modules_0_bn1_running_var[] = { 36394752,36396799 }; +int RN50_layer4__modules_0_bn1_running_var_shape[] = { 512, }; int RN50_layer4__modules_0_bn1_weight[] = { 36396800,36398847 }; +int RN50_layer4__modules_0_bn1_weight_shape[] = { 512, }; int RN50_layer4__modules_0_bn1_bias[] = { 36398848,36400895 }; +int RN50_layer4__modules_0_bn1_bias_shape[] = { 512, }; int RN50_layer4__modules_0_conv2_weight[] = { 36400896,45838079 }; +int RN50_layer4__modules_0_conv2_weight_shape[] = { 512, 512, 3, 3, }; int RN50_layer4__modules_0_bn2_running_mean[] = { 45838080,45840127 }; +int RN50_layer4__modules_0_bn2_running_mean_shape[] = { 512, }; int RN50_layer4__modules_0_bn2_running_var[] = { 45840128,45842175 }; +int RN50_layer4__modules_0_bn2_running_var_shape[] = { 512, }; int RN50_layer4__modules_0_bn2_weight[] = { 45842176,45844223 }; +int RN50_layer4__modules_0_bn2_weight_shape[] = { 512, }; int RN50_layer4__modules_0_bn2_bias[] = { 45844224,45846271 }; +int RN50_layer4__modules_0_bn2_bias_shape[] = { 512, }; int RN50_layer4__modules_0_conv3_weight[] = { 45846272,50040575 }; +int RN50_layer4__modules_0_conv3_weight_shape[] = { 2048, 512, 1, 1, }; int RN50_layer4__modules_0_bn3_running_mean[] = { 50040576,50048767 }; +int RN50_layer4__modules_0_bn3_running_mean_shape[] = { 2048, }; int RN50_layer4__modules_0_bn3_running_var[] = { 50048768,50056959 }; +int RN50_layer4__modules_0_bn3_running_var_shape[] = { 2048, }; int RN50_layer4__modules_0_bn3_weight[] = { 50056960,50065151 }; +int RN50_layer4__modules_0_bn3_weight_shape[] = { 2048, }; int RN50_layer4__modules_0_bn3_bias[] = { 50065152,50073343 }; +int RN50_layer4__modules_0_bn3_bias_shape[] = { 2048, }; int RN50_layer4__modules_0_downsample__modules_0_weight[] = { 50073344,58461951 }; +int RN50_layer4__modules_0_downsample__modules_0_weight_shape[] = { 2048, 1024, 1, 1, }; int RN50_layer4__modules_0_downsample__modules_1_running_mean[] = { 58461952,58470143 }; +int RN50_layer4__modules_0_downsample__modules_1_running_mean_shape[] = { 2048, }; int RN50_layer4__modules_0_downsample__modules_1_running_var[] = { 58470144,58478335 }; +int RN50_layer4__modules_0_downsample__modules_1_running_var_shape[] = { 2048, }; int RN50_layer4__modules_0_downsample__modules_1_weight[] = { 58478336,58486527 }; +int RN50_layer4__modules_0_downsample__modules_1_weight_shape[] = { 2048, }; int RN50_layer4__modules_0_downsample__modules_1_bias[] = { 58486528,58494719 }; +int RN50_layer4__modules_0_downsample__modules_1_bias_shape[] = { 2048, }; int RN50_layer4__modules_1_conv1_weight[] = { 58494720,62689023 }; +int RN50_layer4__modules_1_conv1_weight_shape[] = { 512, 2048, 1, 1, }; int RN50_layer4__modules_1_bn1_running_mean[] = { 62689024,62691071 }; +int RN50_layer4__modules_1_bn1_running_mean_shape[] = { 512, }; int RN50_layer4__modules_1_bn1_running_var[] = { 62691072,62693119 }; +int RN50_layer4__modules_1_bn1_running_var_shape[] = { 512, }; int RN50_layer4__modules_1_bn1_weight[] = { 62693120,62695167 }; +int RN50_layer4__modules_1_bn1_weight_shape[] = { 512, }; int RN50_layer4__modules_1_bn1_bias[] = { 62695168,62697215 }; +int RN50_layer4__modules_1_bn1_bias_shape[] = { 512, }; int RN50_layer4__modules_1_conv2_weight[] = { 62697216,72134399 }; +int RN50_layer4__modules_1_conv2_weight_shape[] = { 512, 512, 3, 3, }; int RN50_layer4__modules_1_bn2_running_mean[] = { 72134400,72136447 }; +int RN50_layer4__modules_1_bn2_running_mean_shape[] = { 512, }; int RN50_layer4__modules_1_bn2_running_var[] = { 72136448,72138495 }; +int RN50_layer4__modules_1_bn2_running_var_shape[] = { 512, }; int RN50_layer4__modules_1_bn2_weight[] = { 72138496,72140543 }; +int RN50_layer4__modules_1_bn2_weight_shape[] = { 512, }; int RN50_layer4__modules_1_bn2_bias[] = { 72140544,72142591 }; +int RN50_layer4__modules_1_bn2_bias_shape[] = { 512, }; int RN50_layer4__modules_1_conv3_weight[] = { 72142592,76336895 }; +int RN50_layer4__modules_1_conv3_weight_shape[] = { 2048, 512, 1, 1, }; int RN50_layer4__modules_1_bn3_running_mean[] = { 76336896,76345087 }; +int RN50_layer4__modules_1_bn3_running_mean_shape[] = { 2048, }; int RN50_layer4__modules_1_bn3_running_var[] = { 76345088,76353279 }; +int RN50_layer4__modules_1_bn3_running_var_shape[] = { 2048, }; int RN50_layer4__modules_1_bn3_weight[] = { 76353280,76361471 }; +int RN50_layer4__modules_1_bn3_weight_shape[] = { 2048, }; int RN50_layer4__modules_1_bn3_bias[] = { 76361472,76369663 }; +int RN50_layer4__modules_1_bn3_bias_shape[] = { 2048, }; int RN50_layer4__modules_2_conv1_weight[] = { 76369664,80563967 }; +int RN50_layer4__modules_2_conv1_weight_shape[] = { 512, 2048, 1, 1, }; int RN50_layer4__modules_2_bn1_running_mean[] = { 80563968,80566015 }; +int RN50_layer4__modules_2_bn1_running_mean_shape[] = { 512, }; int RN50_layer4__modules_2_bn1_running_var[] = { 80566016,80568063 }; +int RN50_layer4__modules_2_bn1_running_var_shape[] = { 512, }; int RN50_layer4__modules_2_bn1_weight[] = { 80568064,80570111 }; +int RN50_layer4__modules_2_bn1_weight_shape[] = { 512, }; int RN50_layer4__modules_2_bn1_bias[] = { 80570112,80572159 }; +int RN50_layer4__modules_2_bn1_bias_shape[] = { 512, }; int RN50_layer4__modules_2_conv2_weight[] = { 80572160,90009343 }; +int RN50_layer4__modules_2_conv2_weight_shape[] = { 512, 512, 3, 3, }; int RN50_layer4__modules_2_bn2_running_mean[] = { 90009344,90011391 }; +int RN50_layer4__modules_2_bn2_running_mean_shape[] = { 512, }; int RN50_layer4__modules_2_bn2_running_var[] = { 90011392,90013439 }; +int RN50_layer4__modules_2_bn2_running_var_shape[] = { 512, }; int RN50_layer4__modules_2_bn2_weight[] = { 90013440,90015487 }; +int RN50_layer4__modules_2_bn2_weight_shape[] = { 512, }; int RN50_layer4__modules_2_bn2_bias[] = { 90015488,90017535 }; +int RN50_layer4__modules_2_bn2_bias_shape[] = { 512, }; int RN50_layer4__modules_2_conv3_weight[] = { 90017536,94211839 }; +int RN50_layer4__modules_2_conv3_weight_shape[] = { 2048, 512, 1, 1, }; int RN50_layer4__modules_2_bn3_running_mean[] = { 94211840,94220031 }; +int RN50_layer4__modules_2_bn3_running_mean_shape[] = { 2048, }; int RN50_layer4__modules_2_bn3_running_var[] = { 94220032,94228223 }; +int RN50_layer4__modules_2_bn3_running_var_shape[] = { 2048, }; int RN50_layer4__modules_2_bn3_weight[] = { 94228224,94236415 }; +int RN50_layer4__modules_2_bn3_weight_shape[] = { 2048, }; int RN50_layer4__modules_2_bn3_bias[] = { 94236416,94244607 }; +int RN50_layer4__modules_2_bn3_bias_shape[] = { 2048, }; int RN50_fc_weight[] = { 94244608,102436607 }; +int RN50_fc_weight_shape[] = { 1000, 2048, }; int RN50_fc_bias[] = { 102436608,102440607 }; +int RN50_fc_bias_shape[] = { 1000, }; int input_0[] = { 102440608,103042719 }; +int input_0_shape[] = { 1, 3, 224, 224, }; int output_0[] = { 103042720,103046719 }; +int output_0_shape[] = { 1, 1000, }; int input_1[] = { 103046720,103648831 }; +int input_1_shape[] = { 1, 3, 224, 224, }; int output_1[] = { 103648832,103652831 }; +int output_1_shape[] = { 1, 1000, }; int input_2[] = { 103652832,104254943 }; +int input_2_shape[] = { 1, 3, 224, 224, }; int output_2[] = { 104254944,104258943 }; +int output_2_shape[] = { 1, 1000, }; int input_3[] = { 104258944,104861055 }; +int input_3_shape[] = { 1, 3, 224, 224, }; int output_3[] = { 104861056,104865055 }; +int output_3_shape[] = { 1, 1000, }; int input_4[] = { 104865056,105467167 }; +int input_4_shape[] = { 1, 3, 224, 224, }; int output_4[] = { 105467168,105471167 }; +int output_4_shape[] = { 1, 1000, }; int input_5[] = { 105471168,106073279 }; +int input_5_shape[] = { 1, 3, 224, 224, }; int output_5[] = { 106073280,106077279 }; +int output_5_shape[] = { 1, 1000, }; int input_6[] = { 106077280,106679391 }; +int input_6_shape[] = { 1, 3, 224, 224, }; int output_6[] = { 106679392,106683391 }; +int output_6_shape[] = { 1, 1000, }; int input_7[] = { 106683392,107285503 }; +int input_7_shape[] = { 1, 3, 224, 224, }; int output_7[] = { 107285504,107289503 }; +int output_7_shape[] = { 1, 1000, }; int input_8[] = { 107289504,107891615 }; +int input_8_shape[] = { 1, 3, 224, 224, }; int output_8[] = { 107891616,107895615 }; +int output_8_shape[] = { 1, 1000, }; int input_9[] = { 107895616,108497727 }; +int input_9_shape[] = { 1, 3, 224, 224, }; int output_9[] = { 108497728,108501727 }; +int output_9_shape[] = { 1, 1000, }; int verify_input[] = { 108501728,109103839 }; +int verify_input_shape[] = { 1, 3, 224, 224, }; int verify_conv1[] = { 109103840,112315103 }; +int verify_conv1_shape[] = { 1, 64, 112, 112, }; int verify_bn1[] = { 112315104,115526367 }; +int verify_bn1_shape[] = { 1, 64, 112, 112, }; int verify_relu[] = { 115526368,118737631 }; +int verify_relu_shape[] = { 1, 64, 112, 112, }; int verify_maxpool[] = { 118737632,119540447 }; +int verify_maxpool_shape[] = { 1, 64, 56, 56, }; int verify_layer1[] = { 119540448,122751711 }; +int verify_layer1_shape[] = { 1, 256, 56, 56, }; int verify_layer2[] = { 122751712,124357343 }; +int verify_layer2_shape[] = { 1, 512, 28, 28, }; int verify_layer3[] = { 124357344,125160159 }; +int verify_layer3_shape[] = { 1, 1024, 14, 14, }; int verify_layer4[] = { 125160160,125561567 }; +int verify_layer4_shape[] = { 1, 2048, 7, 7, }; int verify_avgpool[] = { 125561568,125569759 }; +int verify_avgpool_shape[] = { 1, 2048, 1, 1, }; int verify_fc[] = { 125569760,125573759 }; +int verify_fc_shape[] = { 1, 1000, }; int layer1_block0_conv1_input[] = { 125573760,126376575 }; +int layer1_block0_conv1_input_shape[] = { 1, 64, 56, 56, }; int layer1_block0_conv1_output[] = { 126376576,127179391 }; +int layer1_block0_conv1_output_shape[] = { 64, 56, 56, }; int layer1_block0_bn1_input[] = { 127179392,127982207 }; +int layer1_block0_bn1_input_shape[] = { 1, 64, 56, 56, }; int layer1_block0_bn1_output[] = { 127982208,128785023 }; +int layer1_block0_bn1_output_shape[] = { 64, 56, 56, }; int layer1_block0_conv2_input[] = { 128785024,129587839 }; +int layer1_block0_conv2_input_shape[] = { 1, 64, 56, 56, }; int layer1_block0_conv2_output[] = { 129587840,130390655 }; +int layer1_block0_conv2_output_shape[] = { 64, 56, 56, }; int layer1_block0_bn2_input[] = { 130390656,131193471 }; +int layer1_block0_bn2_input_shape[] = { 1, 64, 56, 56, }; int layer1_block0_bn2_output[] = { 131193472,131996287 }; +int layer1_block0_bn2_output_shape[] = { 64, 56, 56, }; int layer1_block0_conv3_input[] = { 131996288,132799103 }; +int layer1_block0_conv3_input_shape[] = { 1, 64, 56, 56, }; int layer1_block0_conv3_output[] = { 132799104,136010367 }; +int layer1_block0_conv3_output_shape[] = { 256, 56, 56, }; int layer1_block0_bn3_input[] = { 136010368,139221631 }; +int layer1_block0_bn3_input_shape[] = { 1, 256, 56, 56, }; int layer1_block0_bn3_output[] = { 139221632,142432895 }; +int layer1_block0_bn3_output_shape[] = { 256, 56, 56, }; int layer1_block0_downsample_conv_input[] = { 142432896,143235711 }; +int layer1_block0_downsample_conv_input_shape[] = { 1, 64, 56, 56, }; int layer1_block0_downsample_conv_output[] = { 143235712,146446975 }; +int layer1_block0_downsample_conv_output_shape[] = { 256, 56, 56, }; int layer1_block0_downsample_bn_input[] = { 146446976,149658239 }; +int layer1_block0_downsample_bn_input_shape[] = { 1, 256, 56, 56, }; int layer1_block0_downsample_bn_output[] = { 149658240,152869503 }; +int layer1_block0_downsample_bn_output_shape[] = { 256, 56, 56, }; int layer1_block1_conv1_input[] = { 152869504,156080767 }; +int layer1_block1_conv1_input_shape[] = { 1, 256, 56, 56, }; int layer1_block1_conv1_output[] = { 156080768,156883583 }; +int layer1_block1_conv1_output_shape[] = { 64, 56, 56, }; int layer1_block1_bn1_input[] = { 156883584,157686399 }; +int layer1_block1_bn1_input_shape[] = { 1, 64, 56, 56, }; int layer1_block1_bn1_output[] = { 157686400,158489215 }; +int layer1_block1_bn1_output_shape[] = { 64, 56, 56, }; int layer1_block1_conv2_input[] = { 158489216,159292031 }; +int layer1_block1_conv2_input_shape[] = { 1, 64, 56, 56, }; int layer1_block1_conv2_output[] = { 159292032,160094847 }; +int layer1_block1_conv2_output_shape[] = { 64, 56, 56, }; int layer1_block1_bn2_input[] = { 160094848,160897663 }; +int layer1_block1_bn2_input_shape[] = { 1, 64, 56, 56, }; int layer1_block1_bn2_output[] = { 160897664,161700479 }; +int layer1_block1_bn2_output_shape[] = { 64, 56, 56, }; int layer1_block1_conv3_input[] = { 161700480,162503295 }; +int layer1_block1_conv3_input_shape[] = { 1, 64, 56, 56, }; int layer1_block1_conv3_output[] = { 162503296,165714559 }; +int layer1_block1_conv3_output_shape[] = { 256, 56, 56, }; int layer1_block1_bn3_input[] = { 165714560,168925823 }; +int layer1_block1_bn3_input_shape[] = { 1, 256, 56, 56, }; int layer1_block1_bn3_output[] = { 168925824,172137087 }; +int layer1_block1_bn3_output_shape[] = { 256, 56, 56, }; int layer1_block2_conv1_input[] = { 172137088,175348351 }; +int layer1_block2_conv1_input_shape[] = { 1, 256, 56, 56, }; int layer1_block2_conv1_output[] = { 175348352,176151167 }; +int layer1_block2_conv1_output_shape[] = { 64, 56, 56, }; int layer1_block2_bn1_input[] = { 176151168,176953983 }; +int layer1_block2_bn1_input_shape[] = { 1, 64, 56, 56, }; int layer1_block2_bn1_output[] = { 176953984,177756799 }; +int layer1_block2_bn1_output_shape[] = { 64, 56, 56, }; int layer1_block2_conv2_input[] = { 177756800,178559615 }; +int layer1_block2_conv2_input_shape[] = { 1, 64, 56, 56, }; int layer1_block2_conv2_output[] = { 178559616,179362431 }; +int layer1_block2_conv2_output_shape[] = { 64, 56, 56, }; int layer1_block2_bn2_input[] = { 179362432,180165247 }; +int layer1_block2_bn2_input_shape[] = { 1, 64, 56, 56, }; int layer1_block2_bn2_output[] = { 180165248,180968063 }; +int layer1_block2_bn2_output_shape[] = { 64, 56, 56, }; int layer1_block2_conv3_input[] = { 180968064,181770879 }; +int layer1_block2_conv3_input_shape[] = { 1, 64, 56, 56, }; int layer1_block2_conv3_output[] = { 181770880,184982143 }; +int layer1_block2_conv3_output_shape[] = { 256, 56, 56, }; int layer1_block2_bn3_input[] = { 184982144,188193407 }; +int layer1_block2_bn3_input_shape[] = { 1, 256, 56, 56, }; int layer1_block2_bn3_output[] = { 188193408,191404671 }; +int layer1_block2_bn3_output_shape[] = { 256, 56, 56, }; diff --git a/CNNDemo/Resnet50.py b/CNNDemo/Resnet50.py index ced61a7..fedb6b0 100644 --- a/CNNDemo/Resnet50.py +++ b/CNNDemo/Resnet50.py @@ -255,6 +255,13 @@ def genData(name, data, currentbyte, binaryfile, strg): currentbyte = currentbyte+4 strg += str(currentbyte-1) strg = strg + " };\n" + + strg = strg + "int "+name+"_shape[] = { " + array = data.cpu().detach().numpy().shape + for a in array: + strg += str(a) + ", " + strg = strg + " };\n" + return (currentbyte,binaryfile,strg)