Models / resnet
resnet-50
Reconstructed from its own config.json
with no weights read. 1.6M downloads on Hugging Face.
Our count against the checkpoint
The left number comes from the graph. The right one is the number of scalars in the published weight files. Nothing on this page was tuned to make them agree.
What it costs to run
Cost is a roofline estimate on the priced GPU for 10 epochs at batch 32 over 50,000 samples (assumed; no dataset attached). GPU fit is fp32 weights plus gradients plus two Adam moments (16 bytes per parameter) with 1.3x headroom; activations are not included and grow with batch size.
| Card | Memory | |
|---|---|---|
| T4 (16GB) | weights + activations | fits |
| A100 (40GB) | weights + activations | fits |
| H100 (80GB) | weights + activations | fits |
Structure
177 nodes. Output shapes are propagated from the input shape, batch dimension excluded.
| Layer | Type | Output shape | |
|---|---|---|---|
| 1 | Input | Input | 1 × 3 × 224 × 224 |
| 2 | Stem_Conv | Conv2D | 64 × 2 × 112 |
| 3 | Stem_BN | BatchNorm | 64 × 2 × 112 |
| 4 | Stem_ReLU | ReLU | 64 × 2 × 112 |
| 5 | Stem_MaxPool | MaxPool2D | 64 × 1 × 56 |
| 6 | Stage1_Block1_Conv1x1_reduce | Conv2D | 64 × 1 × 56 |
| 7 | Stage1_Block1_BN1 | BatchNorm | 64 × 1 × 56 |
| 8 | Stage1_Block1_ReLU1 | ReLU | 64 × 1 × 56 |
| 9 | Stage1_Block1_Conv3x3 | Conv2D | 64 × 1 × 56 |
| 10 | Stage1_Block1_BN2 | BatchNorm | 64 × 1 × 56 |
| 11 | Stage1_Block1_ReLU2 | ReLU | 64 × 1 × 56 |
| 12 | Stage1_Block1_Conv1x1_expand | Conv2D | 256 × 1 × 56 |
| 13 | Stage1_Block1_BN3 | BatchNorm | 256 × 1 × 56 |
| 14 | Stage1_Block1_Downsample | Conv2D | 256 × 1 × 56 |
| 15 | Stage1_Block1_Downsample_BN | BatchNorm | 256 × 1 × 56 |
| 16 | Stage1_Block1_Add | Add | 256 × 1 × 56 |
| 17 | Stage1_Block1_ReLU_out | ReLU | 256 × 1 × 56 |
| 18 | Stage1_Block2_Conv1x1_reduce | Conv2D | 64 × 1 × 56 |
| 19 | Stage1_Block2_BN1 | BatchNorm | 64 × 1 × 56 |
| 20 | Stage1_Block2_ReLU1 | ReLU | 64 × 1 × 56 |
| 21 | Stage1_Block2_Conv3x3 | Conv2D | 64 × 1 × 56 |
| 22 | Stage1_Block2_BN2 | BatchNorm | 64 × 1 × 56 |
| 23 | Stage1_Block2_ReLU2 | ReLU | 64 × 1 × 56 |
| 24 | Stage1_Block2_Conv1x1_expand | Conv2D | 256 × 1 × 56 |
| 25 | Stage1_Block2_BN3 | BatchNorm | 256 × 1 × 56 |
| 26 | Stage1_Block2_Add | Add | 256 × 1 × 56 |
| 27 | Stage1_Block2_ReLU_out | ReLU | 256 × 1 × 56 |
| 28 | Stage1_Block3_Conv1x1_reduce | Conv2D | 64 × 1 × 56 |
| 29 | Stage1_Block3_BN1 | BatchNorm | 64 × 1 × 56 |
| 30 | Stage1_Block3_ReLU1 | ReLU | 64 × 1 × 56 |
| 31 | Stage1_Block3_Conv3x3 | Conv2D | 64 × 1 × 56 |
| 32 | Stage1_Block3_BN2 | BatchNorm | 64 × 1 × 56 |
| 33 | Stage1_Block3_ReLU2 | ReLU | 64 × 1 × 56 |
| 34 | Stage1_Block3_Conv1x1_expand | Conv2D | 256 × 1 × 56 |
| 35 | Stage1_Block3_BN3 | BatchNorm | 256 × 1 × 56 |
| 36 | Stage1_Block3_Add | Add | 256 × 1 × 56 |
| 37 | Stage1_Block3_ReLU_out | ReLU | 256 × 1 × 56 |
| 38 | Stage2_Block1_Conv1x1_reduce | Conv2D | 128 × 1 × 56 |
| 39 | Stage2_Block1_BN1 | BatchNorm | 128 × 1 × 56 |
| 40 | Stage2_Block1_ReLU1 | ReLU | 128 × 1 × 56 |
| 41 | Stage2_Block1_Conv3x3 | Conv2D | 128 × 1 × 28 |
| 42 | Stage2_Block1_BN2 | BatchNorm | 128 × 1 × 28 |
| 43 | Stage2_Block1_ReLU2 | ReLU | 128 × 1 × 28 |
| 44 | Stage2_Block1_Conv1x1_expand | Conv2D | 512 × 1 × 28 |
| 45 | Stage2_Block1_BN3 | BatchNorm | 512 × 1 × 28 |
| 46 | Stage2_Block1_Downsample | Conv2D | 512 × 1 × 28 |
| 47 | Stage2_Block1_Downsample_BN | BatchNorm | 512 × 1 × 28 |
| 48 | Stage2_Block1_Add | Add | 512 × 1 × 28 |
| 49 | Stage2_Block1_ReLU_out | ReLU | 512 × 1 × 28 |
| 50 | Stage2_Block2_Conv1x1_reduce | Conv2D | 128 × 1 × 28 |
| 51 | Stage2_Block2_BN1 | BatchNorm | 128 × 1 × 28 |
| 52 | Stage2_Block2_ReLU1 | ReLU | 128 × 1 × 28 |
| 53 | Stage2_Block2_Conv3x3 | Conv2D | 128 × 1 × 28 |
| 54 | Stage2_Block2_BN2 | BatchNorm | 128 × 1 × 28 |
| 55 | Stage2_Block2_ReLU2 | ReLU | 128 × 1 × 28 |
| 56 | Stage2_Block2_Conv1x1_expand | Conv2D | 512 × 1 × 28 |
| 57 | Stage2_Block2_BN3 | BatchNorm | 512 × 1 × 28 |
| 58 | Stage2_Block2_Add | Add | 512 × 1 × 28 |
| 59 | Stage2_Block2_ReLU_out | ReLU | 512 × 1 × 28 |
| 60 | Stage2_Block3_Conv1x1_reduce | Conv2D | 128 × 1 × 28 |
| 61 | Stage2_Block3_BN1 | BatchNorm | 128 × 1 × 28 |
| 62 | Stage2_Block3_ReLU1 | ReLU | 128 × 1 × 28 |
| 63 | Stage2_Block3_Conv3x3 | Conv2D | 128 × 1 × 28 |
| 64 | Stage2_Block3_BN2 | BatchNorm | 128 × 1 × 28 |
| 65 | Stage2_Block3_ReLU2 | ReLU | 128 × 1 × 28 |
| 66 | Stage2_Block3_Conv1x1_expand | Conv2D | 512 × 1 × 28 |
| 67 | Stage2_Block3_BN3 | BatchNorm | 512 × 1 × 28 |
| 68 | Stage2_Block3_Add | Add | 512 × 1 × 28 |
| 69 | Stage2_Block3_ReLU_out | ReLU | 512 × 1 × 28 |
| 70 | Stage2_Block4_Conv1x1_reduce | Conv2D | 128 × 1 × 28 |
| 71 | Stage2_Block4_BN1 | BatchNorm | 128 × 1 × 28 |
| 72 | Stage2_Block4_ReLU1 | ReLU | 128 × 1 × 28 |
| 73 | Stage2_Block4_Conv3x3 | Conv2D | 128 × 1 × 28 |
| 74 | Stage2_Block4_BN2 | BatchNorm | 128 × 1 × 28 |
| 75 | Stage2_Block4_ReLU2 | ReLU | 128 × 1 × 28 |
| 76 | Stage2_Block4_Conv1x1_expand | Conv2D | 512 × 1 × 28 |
| 77 | Stage2_Block4_BN3 | BatchNorm | 512 × 1 × 28 |
| 78 | Stage2_Block4_Add | Add | 512 × 1 × 28 |
| 79 | Stage2_Block4_ReLU_out | ReLU | 512 × 1 × 28 |
| 80 | Stage3_Block1_Conv1x1_reduce | Conv2D | 256 × 1 × 28 |
| 81 | Stage3_Block1_BN1 | BatchNorm | 256 × 1 × 28 |
| 82 | Stage3_Block1_ReLU1 | ReLU | 256 × 1 × 28 |
| 83 | Stage3_Block1_Conv3x3 | Conv2D | 256 × 1 × 14 |
| 84 | Stage3_Block1_BN2 | BatchNorm | 256 × 1 × 14 |
| 85 | Stage3_Block1_ReLU2 | ReLU | 256 × 1 × 14 |
| 86 | Stage3_Block1_Conv1x1_expand | Conv2D | 1024 × 1 × 14 |
| 87 | Stage3_Block1_BN3 | BatchNorm | 1024 × 1 × 14 |
| 88 | Stage3_Block1_Downsample | Conv2D | 1024 × 1 × 14 |
| 89 | Stage3_Block1_Downsample_BN | BatchNorm | 1024 × 1 × 14 |
| 90 | Stage3_Block1_Add | Add | 1024 × 1 × 14 |
| 91 | Stage3_Block1_ReLU_out | ReLU | 1024 × 1 × 14 |
| 92 | Stage3_Block2_Conv1x1_reduce | Conv2D | 256 × 1 × 14 |
| 93 | Stage3_Block2_BN1 | BatchNorm | 256 × 1 × 14 |
| 94 | Stage3_Block2_ReLU1 | ReLU | 256 × 1 × 14 |
| 95 | Stage3_Block2_Conv3x3 | Conv2D | 256 × 1 × 14 |
| 96 | Stage3_Block2_BN2 | BatchNorm | 256 × 1 × 14 |
| 97 | Stage3_Block2_ReLU2 | ReLU | 256 × 1 × 14 |
| 98 | Stage3_Block2_Conv1x1_expand | Conv2D | 1024 × 1 × 14 |
| 99 | Stage3_Block2_BN3 | BatchNorm | 1024 × 1 × 14 |
| 100 | Stage3_Block2_Add | Add | 1024 × 1 × 14 |
| 101 | Stage3_Block2_ReLU_out | ReLU | 1024 × 1 × 14 |
| 102 | Stage3_Block3_Conv1x1_reduce | Conv2D | 256 × 1 × 14 |
| 103 | Stage3_Block3_BN1 | BatchNorm | 256 × 1 × 14 |
| 104 | Stage3_Block3_ReLU1 | ReLU | 256 × 1 × 14 |
| 105 | Stage3_Block3_Conv3x3 | Conv2D | 256 × 1 × 14 |
| 106 | Stage3_Block3_BN2 | BatchNorm | 256 × 1 × 14 |
| 107 | Stage3_Block3_ReLU2 | ReLU | 256 × 1 × 14 |
| 108 | Stage3_Block3_Conv1x1_expand | Conv2D | 1024 × 1 × 14 |
| 109 | Stage3_Block3_BN3 | BatchNorm | 1024 × 1 × 14 |
| 110 | Stage3_Block3_Add | Add | 1024 × 1 × 14 |
| 111 | Stage3_Block3_ReLU_out | ReLU | 1024 × 1 × 14 |
| 112 | Stage3_Block4_Conv1x1_reduce | Conv2D | 256 × 1 × 14 |
| 113 | Stage3_Block4_BN1 | BatchNorm | 256 × 1 × 14 |
| 114 | Stage3_Block4_ReLU1 | ReLU | 256 × 1 × 14 |
| 115 | Stage3_Block4_Conv3x3 | Conv2D | 256 × 1 × 14 |
| 116 | Stage3_Block4_BN2 | BatchNorm | 256 × 1 × 14 |
| 117 | Stage3_Block4_ReLU2 | ReLU | 256 × 1 × 14 |
| 118 | Stage3_Block4_Conv1x1_expand | Conv2D | 1024 × 1 × 14 |
| 119 | Stage3_Block4_BN3 | BatchNorm | 1024 × 1 × 14 |
| 120 | Stage3_Block4_Add | Add | 1024 × 1 × 14 |
| 121 | Stage3_Block4_ReLU_out | ReLU | 1024 × 1 × 14 |
| 122 | Stage3_Block5_Conv1x1_reduce | Conv2D | 256 × 1 × 14 |
| 123 | Stage3_Block5_BN1 | BatchNorm | 256 × 1 × 14 |
| 124 | Stage3_Block5_ReLU1 | ReLU | 256 × 1 × 14 |
| 125 | Stage3_Block5_Conv3x3 | Conv2D | 256 × 1 × 14 |
| 126 | Stage3_Block5_BN2 | BatchNorm | 256 × 1 × 14 |
| 127 | Stage3_Block5_ReLU2 | ReLU | 256 × 1 × 14 |
| 128 | Stage3_Block5_Conv1x1_expand | Conv2D | 1024 × 1 × 14 |
| 129 | Stage3_Block5_BN3 | BatchNorm | 1024 × 1 × 14 |
| 130 | Stage3_Block5_Add | Add | 1024 × 1 × 14 |
| 131 | Stage3_Block5_ReLU_out | ReLU | 1024 × 1 × 14 |
| 132 | Stage3_Block6_Conv1x1_reduce | Conv2D | 256 × 1 × 14 |
| 133 | Stage3_Block6_BN1 | BatchNorm | 256 × 1 × 14 |
| 134 | Stage3_Block6_ReLU1 | ReLU | 256 × 1 × 14 |
| 135 | Stage3_Block6_Conv3x3 | Conv2D | 256 × 1 × 14 |
| 136 | Stage3_Block6_BN2 | BatchNorm | 256 × 1 × 14 |
| 137 | Stage3_Block6_ReLU2 | ReLU | 256 × 1 × 14 |
| 138 | Stage3_Block6_Conv1x1_expand | Conv2D | 1024 × 1 × 14 |
| 139 | Stage3_Block6_BN3 | BatchNorm | 1024 × 1 × 14 |
| 140 | Stage3_Block6_Add | Add | 1024 × 1 × 14 |
| 141 | Stage3_Block6_ReLU_out | ReLU | 1024 × 1 × 14 |
| 142 | Stage4_Block1_Conv1x1_reduce | Conv2D | 512 × 1 × 14 |
| 143 | Stage4_Block1_BN1 | BatchNorm | 512 × 1 × 14 |
| 144 | Stage4_Block1_ReLU1 | ReLU | 512 × 1 × 14 |
| 145 | Stage4_Block1_Conv3x3 | Conv2D | 512 × 1 × 7 |
| 146 | Stage4_Block1_BN2 | BatchNorm | 512 × 1 × 7 |
| 147 | Stage4_Block1_ReLU2 | ReLU | 512 × 1 × 7 |
| 148 | Stage4_Block1_Conv1x1_expand | Conv2D | 2048 × 1 × 7 |
| 149 | Stage4_Block1_BN3 | BatchNorm | 2048 × 1 × 7 |
| 150 | Stage4_Block1_Downsample | Conv2D | 2048 × 1 × 7 |
| 151 | Stage4_Block1_Downsample_BN | BatchNorm | 2048 × 1 × 7 |
| 152 | Stage4_Block1_Add | Add | 2048 × 1 × 7 |
| 153 | Stage4_Block1_ReLU_out | ReLU | 2048 × 1 × 7 |
| 154 | Stage4_Block2_Conv1x1_reduce | Conv2D | 512 × 1 × 7 |
| 155 | Stage4_Block2_BN1 | BatchNorm | 512 × 1 × 7 |
| 156 | Stage4_Block2_ReLU1 | ReLU | 512 × 1 × 7 |
| 157 | Stage4_Block2_Conv3x3 | Conv2D | 512 × 1 × 7 |
| 158 | Stage4_Block2_BN2 | BatchNorm | 512 × 1 × 7 |
| 159 | Stage4_Block2_ReLU2 | ReLU | 512 × 1 × 7 |
| 160 | Stage4_Block2_Conv1x1_expand | Conv2D | 2048 × 1 × 7 |
| 161 | Stage4_Block2_BN3 | BatchNorm | 2048 × 1 × 7 |
| 162 | Stage4_Block2_Add | Add | 2048 × 1 × 7 |
| 163 | Stage4_Block2_ReLU_out | ReLU | 2048 × 1 × 7 |
| 164 | Stage4_Block3_Conv1x1_reduce | Conv2D | 512 × 1 × 7 |
| 165 | Stage4_Block3_BN1 | BatchNorm | 512 × 1 × 7 |
| 166 | Stage4_Block3_ReLU1 | ReLU | 512 × 1 × 7 |
| 167 | Stage4_Block3_Conv3x3 | Conv2D | 512 × 1 × 7 |
| 168 | Stage4_Block3_BN2 | BatchNorm | 512 × 1 × 7 |
| 169 | Stage4_Block3_ReLU2 | ReLU | 512 × 1 × 7 |
| 170 | Stage4_Block3_Conv1x1_expand | Conv2D | 2048 × 1 × 7 |
| 171 | Stage4_Block3_BN3 | BatchNorm | 2048 × 1 × 7 |
| 172 | Stage4_Block3_Add | Add | 2048 × 1 × 7 |
| 173 | Stage4_Block3_ReLU_out | ReLU | 2048 × 1 × 7 |
| 174 | GlobalAvgPool | GlobalAvgPool2D | 2048 |
| 175 | Flatten | Flatten | 2048 |
| 176 | Classifier | Linear | 1000 |
| 177 | Output | Output | 1000 |
What the verifier says
No finding on the reconstructed graph. See the checks.
Do this to your own model
Same numbers, on a model in your repo, in one command. No account.
pip install neurarch-trace
neurarch-trace microsoft/resnet-50 --plan --share