Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bring Andrew's PR to main #63

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
73 changes: 73 additions & 0 deletions models/mobilenet-simplified-for-inference-shallow.relay
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#[version = "0.0.5"]
def @main(%data: Tensor[(1, 3, 32, 32), float32], %conv_block_1_conv_weight: Tensor[(32, 3, 3, 3), float32], %conv_block_1_bn_gamma: Tensor[(32), float32], %conv_block_1_bn_beta: Tensor[(32), float32], %conv_block_1_bn_moving_mean: Tensor[(32), float32], %conv_block_1_bn_moving_var: Tensor[(32), float32], %separable_conv_block_1_weight: Tensor[(32, 1, 3, 3), float32], %separable_conv_block_1_bn1_gamma: Tensor[(32), float32], %separable_conv_block_1_bn1_beta: Tensor[(32), float32], %separable_conv_block_1_bn1_moving_mean: Tensor[(32), float32], %separable_conv_block_1_bn1_moving_var: Tensor[(32), float32], %separable_conv_block_1_conv2_weight: Tensor[(64, 32, 1, 1), float32], %separable_conv_block_1_bn2_gamma: Tensor[(64), float32], %separable_conv_block_1_bn2_beta: Tensor[(64), float32], %separable_conv_block_1_bn2_moving_mean: Tensor[(64), float32], %separable_conv_block_1_bn2_moving_var: Tensor[(64), float32], %separable_conv_block_2_weight: Tensor[(64, 1, 3, 3), float32], %separable_conv_block_2_bn1_gamma: Tensor[(64), float32], %separable_conv_block_2_bn1_beta: Tensor[(64), float32], %separable_conv_block_2_bn1_moving_mean: Tensor[(64), float32], %separable_conv_block_2_bn1_moving_var: Tensor[(64), float32], %separable_conv_block_2_conv2_weight: Tensor[(128, 64, 1, 1), float32], %separable_conv_block_2_bn2_gamma: Tensor[(128), float32], %separable_conv_block_2_bn2_beta: Tensor[(128), float32], %separable_conv_block_2_bn2_moving_mean: Tensor[(128), float32], %separable_conv_block_2_bn2_moving_var: Tensor[(128), float32], %fc_weight: Tensor[(10, 128), float32], %fc_bias: Tensor[(10), float32]) -> Tensor[(1, 10), float32] {
%0 = nn.conv2d(%data, %conv_block_1_conv_weight, strides=[2, 2], padding=[1, 1, 1, 1], channels=32, kernel_size=[3, 3]) /* ty=Tensor[(1, 32, 16, 16), float32] */;
%1 = add(%conv_block_1_bn_moving_var, 1e-05f /* ty=float32 */) /* ty=Tensor[(32), float32] */;
%2 = sqrt(%1) /* ty=Tensor[(32), float32] */;
%3 = divide(1f /* ty=float32 */, %2) /* ty=Tensor[(32), float32] */;
%4 = multiply(%3, %conv_block_1_bn_gamma) /* ty=Tensor[(32), float32] */;
%5 = expand_dims(%4, axis=1, num_newaxis=2) /* ty=Tensor[(32, 1, 1), float32] */;
%6 = multiply(%0, %5) /* ty=Tensor[(1, 32, 16, 16), float32] */;
%7 = negative(%conv_block_1_bn_moving_mean) /* ty=Tensor[(32), float32] */;
%8 = multiply(%7, %4) /* ty=Tensor[(32), float32] */;
%9 = add(%8, %conv_block_1_bn_beta) /* ty=Tensor[(32), float32] */;
%10 = expand_dims(%9, axis=1, num_newaxis=2) /* ty=Tensor[(32, 1, 1), float32] */;
%11 = add(%6, %10) /* ty=Tensor[(1, 32, 16, 16), float32] */;
%12 = nn.relu(%11) /* ty=Tensor[(1, 32, 16, 16), float32] */;
%13 = nn.conv2d(%12, %separable_conv_block_1_weight, padding=[1, 1, 1, 1], groups=32, channels=32, kernel_size=[3, 3]) /* ty=Tensor[(1, 32, 16, 16), float32] */;
%14 = add(%separable_conv_block_1_bn1_moving_var, 1e-05f /* ty=float32 */) /* ty=Tensor[(32), float32] */;
%15 = sqrt(%14) /* ty=Tensor[(32), float32] */;
%16 = divide(1f /* ty=float32 */, %15) /* ty=Tensor[(32), float32] */;
%17 = multiply(%16, %separable_conv_block_1_bn1_gamma) /* ty=Tensor[(32), float32] */;
%18 = expand_dims(%17, axis=1, num_newaxis=2) /* ty=Tensor[(32, 1, 1), float32] */;
%19 = multiply(%13, %18) /* ty=Tensor[(1, 32, 16, 16), float32] */;
%20 = negative(%separable_conv_block_1_bn1_moving_mean) /* ty=Tensor[(32), float32] */;
%21 = multiply(%20, %17) /* ty=Tensor[(32), float32] */;
%22 = add(%21, %separable_conv_block_1_bn1_beta) /* ty=Tensor[(32), float32] */;
%23 = expand_dims(%22, axis=1, num_newaxis=2) /* ty=Tensor[(32, 1, 1), float32] */;
%24 = add(%19, %23) /* ty=Tensor[(1, 32, 16, 16), float32] */;
%25 = nn.relu(%24) /* ty=Tensor[(1, 32, 16, 16), float32] */;
%26 = nn.conv2d(%25, %separable_conv_block_1_conv2_weight, padding=[0, 0, 0, 0], channels=64, kernel_size=[1, 1]) /* ty=Tensor[(1, 64, 16, 16), float32] */;
%27 = add(%separable_conv_block_1_bn2_moving_var, 1e-05f /* ty=float32 */) /* ty=Tensor[(64), float32] */;
%28 = sqrt(%27) /* ty=Tensor[(64), float32] */;
%29 = divide(1f /* ty=float32 */, %28) /* ty=Tensor[(64), float32] */;
%30 = multiply(%29, %separable_conv_block_1_bn2_gamma) /* ty=Tensor[(64), float32] */;
%31 = expand_dims(%30, axis=1, num_newaxis=2) /* ty=Tensor[(64, 1, 1), float32] */;
%32 = multiply(%26, %31) /* ty=Tensor[(1, 64, 16, 16), float32] */;
%33 = negative(%separable_conv_block_1_bn2_moving_mean) /* ty=Tensor[(64), float32] */;
%34 = multiply(%33, %30) /* ty=Tensor[(64), float32] */;
%35 = add(%34, %separable_conv_block_1_bn2_beta) /* ty=Tensor[(64), float32] */;
%36 = expand_dims(%35, axis=1, num_newaxis=2) /* ty=Tensor[(64, 1, 1), float32] */;
%37 = add(%32, %36) /* ty=Tensor[(1, 64, 16, 16), float32] */;
%38 = nn.relu(%37) /* ty=Tensor[(1, 64, 16, 16), float32] */;
%39 = nn.conv2d(%38, %separable_conv_block_2_weight, strides=[2, 2], padding=[1, 1, 1, 1], groups=64, channels=64, kernel_size=[3, 3]) /* ty=Tensor[(1, 64, 8, 8), float32] */;
%40 = add(%separable_conv_block_2_bn1_moving_var, 1e-05f /* ty=float32 */) /* ty=Tensor[(64), float32] */;
%41 = sqrt(%40) /* ty=Tensor[(64), float32] */;
%42 = divide(1f /* ty=float32 */, %41) /* ty=Tensor[(64), float32] */;
%43 = multiply(%42, %separable_conv_block_2_bn1_gamma) /* ty=Tensor[(64), float32] */;
%44 = expand_dims(%43, axis=1, num_newaxis=2) /* ty=Tensor[(64, 1, 1), float32] */;
%45 = multiply(%39, %44) /* ty=Tensor[(1, 64, 8, 8), float32] */;
%46 = negative(%separable_conv_block_2_bn1_moving_mean) /* ty=Tensor[(64), float32] */;
%47 = multiply(%46, %43) /* ty=Tensor[(64), float32] */;
%48 = add(%47, %separable_conv_block_2_bn1_beta) /* ty=Tensor[(64), float32] */;
%49 = expand_dims(%48, axis=1, num_newaxis=2) /* ty=Tensor[(64, 1, 1), float32] */;
%50 = add(%45, %49) /* ty=Tensor[(1, 64, 8, 8), float32] */;
%51 = nn.relu(%50) /* ty=Tensor[(1, 64, 8, 8), float32] */;
%52 = nn.conv2d(%51, %separable_conv_block_2_conv2_weight, padding=[0, 0, 0, 0], channels=128, kernel_size=[1, 1]) /* ty=Tensor[(1, 128, 8, 8), float32] */;
%53 = add(%separable_conv_block_2_bn2_moving_var, 1e-05f /* ty=float32 */) /* ty=Tensor[(128), float32] */;
%54 = sqrt(%53) /* ty=Tensor[(128), float32] */;
%55 = divide(1f /* ty=float32 */, %54) /* ty=Tensor[(128), float32] */;
%56 = multiply(%55, %separable_conv_block_2_bn2_gamma) /* ty=Tensor[(128), float32] */;
%57 = expand_dims(%56, axis=1, num_newaxis=2) /* ty=Tensor[(128, 1, 1), float32] */;
%58 = multiply(%52, %57) /* ty=Tensor[(1, 128, 8, 8), float32] */;
%59 = negative(%separable_conv_block_2_bn2_moving_mean) /* ty=Tensor[(128), float32] */;
%60 = multiply(%59, %56) /* ty=Tensor[(128), float32] */;
%61 = add(%60, %separable_conv_block_2_bn2_beta) /* ty=Tensor[(128), float32] */;
%62 = expand_dims(%61, axis=1, num_newaxis=2) /* ty=Tensor[(128, 1, 1), float32] */;
%63 = add(%58, %62) /* ty=Tensor[(1, 128, 8, 8), float32] */;
%64 = nn.relu(%63) /* ty=Tensor[(1, 128, 8, 8), float32] */;
%65 = nn.global_avg_pool2d(%64) /* ty=Tensor[(1, 128, 1, 1), float32] */;
%66 = nn.batch_flatten(%65) /* ty=Tensor[(1, 128), float32] */;
%67 = nn.dense(%66, %fc_weight, units=10) /* ty=Tensor[(1, 10), float32] */;
%68 = nn.bias_add(%67, %fc_bias) /* ty=Tensor[(1, 10), float32] */;
nn.softmax(%68) /* ty=Tensor[(1, 10), float32] */
}
115 changes: 115 additions & 0 deletions models/resnet-simplified-for-inference-shallow.relay
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
#[version = "0.0.5"]
def @main(%data: Tensor[(1, 3, 28, 28), float32], %bn_data_gamma: Tensor[(3), float32], %bn_data_beta: Tensor[(3), float32], %bn_data_moving_mean: Tensor[(3), float32], %bn_data_moving_var: Tensor[(3), float32], %conv0_weight: Tensor[(16, 3, 3, 3), float32], %stage1_unit1_bn1_gamma: Tensor[(16), float32], %stage1_unit1_bn1_beta: Tensor[(16), float32], %stage1_unit1_bn1_moving_mean: Tensor[(16), float32], %stage1_unit1_bn1_moving_var: Tensor[(16), float32], %stage1_unit1_conv1_weight: Tensor[(16, 16, 3, 3), float32], %stage1_unit1_bn2_gamma: Tensor[(16), float32], %stage1_unit1_bn2_beta: Tensor[(16), float32], %stage1_unit1_bn2_moving_mean: Tensor[(16), float32], %stage1_unit1_bn2_moving_var: Tensor[(16), float32], %stage1_unit1_conv2_weight: Tensor[(16, 16, 3, 3), float32], %stage1_unit1_sc_weight: Tensor[(16, 16, 1, 1), float32], %stage2_unit1_bn1_gamma: Tensor[(16), float32], %stage2_unit1_bn1_beta: Tensor[(16), float32], %stage2_unit1_bn1_moving_mean: Tensor[(16), float32], %stage2_unit1_bn1_moving_var: Tensor[(16), float32], %stage2_unit1_conv1_weight: Tensor[(32, 16, 3, 3), float32], %stage2_unit1_bn2_gamma: Tensor[(32), float32], %stage2_unit1_bn2_beta: Tensor[(32), float32], %stage2_unit1_bn2_moving_mean: Tensor[(32), float32], %stage2_unit1_bn2_moving_var: Tensor[(32), float32], %stage2_unit1_conv2_weight: Tensor[(32, 32, 3, 3), float32], %stage2_unit1_sc_weight: Tensor[(32, 16, 1, 1), float32], %stage3_unit1_bn1_gamma: Tensor[(32), float32], %stage3_unit1_bn1_beta: Tensor[(32), float32], %stage3_unit1_bn1_moving_mean: Tensor[(32), float32], %stage3_unit1_bn1_moving_var: Tensor[(32), float32], %stage3_unit1_conv1_weight: Tensor[(64, 32, 3, 3), float32], %stage3_unit1_bn2_gamma: Tensor[(64), float32], %stage3_unit1_bn2_beta: Tensor[(64), float32], %stage3_unit1_bn2_moving_mean: Tensor[(64), float32], %stage3_unit1_bn2_moving_var: Tensor[(64), float32], %stage3_unit1_conv2_weight: Tensor[(64, 64, 3, 3), float32], %stage3_unit1_sc_weight: Tensor[(64, 32, 1, 1), float32], %bn1_gamma: Tensor[(64), float32], %bn1_beta: Tensor[(64), float32], %bn1_moving_mean: Tensor[(64), float32], %bn1_moving_var: Tensor[(64), float32], %fc1_weight: Tensor[(10, 64), float32], %fc1_bias: Tensor[(10), float32]) -> Tensor[(1, 10), float32] {
%0 = add(%bn_data_moving_var, 2e-05f /* ty=float32 */) /* ty=Tensor[(3), float32] */;
%1 = sqrt(%0) /* ty=Tensor[(3), float32] */;
%2 = divide(1f /* ty=float32 */, %1) /* ty=Tensor[(3), float32] */;
%3 = expand_dims(%2, axis=1, num_newaxis=2) /* ty=Tensor[(3, 1, 1), float32] */;
%4 = multiply(%data, %3) /* ty=Tensor[(1, 3, 28, 28), float32] */;
%5 = negative(%bn_data_moving_mean) /* ty=Tensor[(3), float32] */;
%6 = multiply(%5, %2) /* ty=Tensor[(3), float32] */;
%7 = add(%6, %bn_data_beta) /* ty=Tensor[(3), float32] */;
%8 = expand_dims(%7, axis=1, num_newaxis=2) /* ty=Tensor[(3, 1, 1), float32] */;
%9 = add(%4, %8) /* ty=Tensor[(1, 3, 28, 28), float32] */;
%10 = nn.conv2d(%9, %conv0_weight, padding=[1, 1, 1, 1], channels=16, kernel_size=[3, 3]) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%11 = add(%stage1_unit1_bn1_moving_var, 2e-05f /* ty=float32 */) /* ty=Tensor[(16), float32] */;
%12 = sqrt(%11) /* ty=Tensor[(16), float32] */;
%13 = divide(1f /* ty=float32 */, %12) /* ty=Tensor[(16), float32] */;
%14 = multiply(%13, %stage1_unit1_bn1_gamma) /* ty=Tensor[(16), float32] */;
%15 = expand_dims(%14, axis=1, num_newaxis=2) /* ty=Tensor[(16, 1, 1), float32] */;
%16 = multiply(%10, %15) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%17 = negative(%stage1_unit1_bn1_moving_mean) /* ty=Tensor[(16), float32] */;
%18 = multiply(%17, %14) /* ty=Tensor[(16), float32] */;
%19 = add(%18, %stage1_unit1_bn1_beta) /* ty=Tensor[(16), float32] */;
%20 = expand_dims(%19, axis=1, num_newaxis=2) /* ty=Tensor[(16, 1, 1), float32] */;
%21 = add(%16, %20) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%22 = nn.relu(%21) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%23 = nn.conv2d(%22, %stage1_unit1_conv1_weight, padding=[1, 1, 1, 1], channels=16, kernel_size=[3, 3]) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%24 = add(%stage1_unit1_bn2_moving_var, 2e-05f /* ty=float32 */) /* ty=Tensor[(16), float32] */;
%25 = sqrt(%24) /* ty=Tensor[(16), float32] */;
%26 = divide(1f /* ty=float32 */, %25) /* ty=Tensor[(16), float32] */;
%27 = multiply(%26, %stage1_unit1_bn2_gamma) /* ty=Tensor[(16), float32] */;
%28 = expand_dims(%27, axis=1, num_newaxis=2) /* ty=Tensor[(16, 1, 1), float32] */;
%29 = multiply(%23, %28) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%30 = negative(%stage1_unit1_bn2_moving_mean) /* ty=Tensor[(16), float32] */;
%31 = multiply(%30, %27) /* ty=Tensor[(16), float32] */;
%32 = add(%31, %stage1_unit1_bn2_beta) /* ty=Tensor[(16), float32] */;
%33 = expand_dims(%32, axis=1, num_newaxis=2) /* ty=Tensor[(16, 1, 1), float32] */;
%34 = add(%29, %33) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%35 = nn.relu(%34) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%36 = nn.conv2d(%35, %stage1_unit1_conv2_weight, padding=[1, 1, 1, 1], channels=16, kernel_size=[3, 3]) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%37 = nn.conv2d(%22, %stage1_unit1_sc_weight, padding=[0, 0, 0, 0], channels=16, kernel_size=[1, 1]) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%38 = add(%36, %37) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%39 = add(%stage2_unit1_bn1_moving_var, 2e-05f /* ty=float32 */) /* ty=Tensor[(16), float32] */;
%40 = sqrt(%39) /* ty=Tensor[(16), float32] */;
%41 = divide(1f /* ty=float32 */, %40) /* ty=Tensor[(16), float32] */;
%42 = multiply(%41, %stage2_unit1_bn1_gamma) /* ty=Tensor[(16), float32] */;
%43 = expand_dims(%42, axis=1, num_newaxis=2) /* ty=Tensor[(16, 1, 1), float32] */;
%44 = multiply(%38, %43) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%45 = negative(%stage2_unit1_bn1_moving_mean) /* ty=Tensor[(16), float32] */;
%46 = multiply(%45, %42) /* ty=Tensor[(16), float32] */;
%47 = add(%46, %stage2_unit1_bn1_beta) /* ty=Tensor[(16), float32] */;
%48 = expand_dims(%47, axis=1, num_newaxis=2) /* ty=Tensor[(16, 1, 1), float32] */;
%49 = add(%44, %48) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%50 = nn.relu(%49) /* ty=Tensor[(1, 16, 28, 28), float32] */;
%51 = nn.conv2d(%50, %stage2_unit1_conv1_weight, strides=[2, 2], padding=[1, 1, 1, 1], channels=32, kernel_size=[3, 3]) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%52 = add(%stage2_unit1_bn2_moving_var, 2e-05f /* ty=float32 */) /* ty=Tensor[(32), float32] */;
%53 = sqrt(%52) /* ty=Tensor[(32), float32] */;
%54 = divide(1f /* ty=float32 */, %53) /* ty=Tensor[(32), float32] */;
%55 = multiply(%54, %stage2_unit1_bn2_gamma) /* ty=Tensor[(32), float32] */;
%56 = expand_dims(%55, axis=1, num_newaxis=2) /* ty=Tensor[(32, 1, 1), float32] */;
%57 = multiply(%51, %56) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%58 = negative(%stage2_unit1_bn2_moving_mean) /* ty=Tensor[(32), float32] */;
%59 = multiply(%58, %55) /* ty=Tensor[(32), float32] */;
%60 = add(%59, %stage2_unit1_bn2_beta) /* ty=Tensor[(32), float32] */;
%61 = expand_dims(%60, axis=1, num_newaxis=2) /* ty=Tensor[(32, 1, 1), float32] */;
%62 = add(%57, %61) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%63 = nn.relu(%62) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%64 = nn.conv2d(%63, %stage2_unit1_conv2_weight, padding=[1, 1, 1, 1], channels=32, kernel_size=[3, 3]) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%65 = nn.conv2d(%50, %stage2_unit1_sc_weight, strides=[2, 2], padding=[0, 0, 0, 0], channels=32, kernel_size=[1, 1]) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%66 = add(%64, %65) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%67 = add(%stage3_unit1_bn1_moving_var, 2e-05f /* ty=float32 */) /* ty=Tensor[(32), float32] */;
%68 = sqrt(%67) /* ty=Tensor[(32), float32] */;
%69 = divide(1f /* ty=float32 */, %68) /* ty=Tensor[(32), float32] */;
%70 = multiply(%69, %stage3_unit1_bn1_gamma) /* ty=Tensor[(32), float32] */;
%71 = expand_dims(%70, axis=1, num_newaxis=2) /* ty=Tensor[(32, 1, 1), float32] */;
%72 = multiply(%66, %71) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%73 = negative(%stage3_unit1_bn1_moving_mean) /* ty=Tensor[(32), float32] */;
%74 = multiply(%73, %70) /* ty=Tensor[(32), float32] */;
%75 = add(%74, %stage3_unit1_bn1_beta) /* ty=Tensor[(32), float32] */;
%76 = expand_dims(%75, axis=1, num_newaxis=2) /* ty=Tensor[(32, 1, 1), float32] */;
%77 = add(%72, %76) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%78 = nn.relu(%77) /* ty=Tensor[(1, 32, 14, 14), float32] */;
%79 = nn.conv2d(%78, %stage3_unit1_conv1_weight, strides=[2, 2], padding=[1, 1, 1, 1], channels=64, kernel_size=[3, 3]) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%80 = add(%stage3_unit1_bn2_moving_var, 2e-05f /* ty=float32 */) /* ty=Tensor[(64), float32] */;
%81 = sqrt(%80) /* ty=Tensor[(64), float32] */;
%82 = divide(1f /* ty=float32 */, %81) /* ty=Tensor[(64), float32] */;
%83 = multiply(%82, %stage3_unit1_bn2_gamma) /* ty=Tensor[(64), float32] */;
%84 = expand_dims(%83, axis=1, num_newaxis=2) /* ty=Tensor[(64, 1, 1), float32] */;
%85 = multiply(%79, %84) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%86 = negative(%stage3_unit1_bn2_moving_mean) /* ty=Tensor[(64), float32] */;
%87 = multiply(%86, %83) /* ty=Tensor[(64), float32] */;
%88 = add(%87, %stage3_unit1_bn2_beta) /* ty=Tensor[(64), float32] */;
%89 = expand_dims(%88, axis=1, num_newaxis=2) /* ty=Tensor[(64, 1, 1), float32] */;
%90 = add(%85, %89) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%91 = nn.relu(%90) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%92 = nn.conv2d(%91, %stage3_unit1_conv2_weight, padding=[1, 1, 1, 1], channels=64, kernel_size=[3, 3]) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%93 = nn.conv2d(%78, %stage3_unit1_sc_weight, strides=[2, 2], padding=[0, 0, 0, 0], channels=64, kernel_size=[1, 1]) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%94 = add(%92, %93) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%95 = add(%bn1_moving_var, 2e-05f /* ty=float32 */) /* ty=Tensor[(64), float32] */;
%96 = sqrt(%95) /* ty=Tensor[(64), float32] */;
%97 = divide(1f /* ty=float32 */, %96) /* ty=Tensor[(64), float32] */;
%98 = multiply(%97, %bn1_gamma) /* ty=Tensor[(64), float32] */;
%99 = expand_dims(%98, axis=1, num_newaxis=2) /* ty=Tensor[(64, 1, 1), float32] */;
%100 = multiply(%94, %99) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%101 = negative(%bn1_moving_mean) /* ty=Tensor[(64), float32] */;
%102 = multiply(%101, %98) /* ty=Tensor[(64), float32] */;
%103 = add(%102, %bn1_beta) /* ty=Tensor[(64), float32] */;
%104 = expand_dims(%103, axis=1, num_newaxis=2) /* ty=Tensor[(64, 1, 1), float32] */;
%105 = add(%100, %104) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%106 = nn.relu(%105) /* ty=Tensor[(1, 64, 7, 7), float32] */;
%107 = nn.global_avg_pool2d(%106) /* ty=Tensor[(1, 64, 1, 1), float32] */;
%108 = nn.batch_flatten(%107) /* ty=Tensor[(1, 64), float32] */;
%109 = nn.dense(%108, %fc1_weight, units=10) /* ty=Tensor[(1, 10), float32] */;
%110 = nn.bias_add(%109, %fc1_bias, axis=-1) /* ty=Tensor[(1, 10), float32] */;
nn.softmax(%110) /* ty=Tensor[(1, 10), float32] */
}
Loading