File size: 5,841 Bytes
32d8c58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
{
  "architecture": {
    "family": "image_classification",
    "is_moe": false,
    "view": "encoder"
  },
  "capabilities": {
    "task_heads": [
      "backbone",
      "image",
      "image_classification"
    ],
    "tensor_parallel": false
  },
  "components": [
    {
      "children": [
        "embeddings",
        "encoder",
        "layernorm"
      ],
      "class_name": "ConvNextV2Model",
      "id": "model",
      "kind": "model",
      "path_pattern": "model"
    },
    {
      "attributes": {},
      "children": [
        "embeddings.patch_embeddings",
        "embeddings.layernorm"
      ],
      "class_name": "ConvNextV2Embeddings",
      "id": "embeddings",
      "kind": "embedding",
      "path_pattern": "model.embeddings"
    },
    {
      "class_name": "Conv2d",
      "id": "embeddings.patch_embeddings",
      "kind": "convolution",
      "path_pattern": "model.embeddings.patch_embeddings"
    },
    {
      "attributes": {
        "norm_type": "layer"
      },
      "class_name": "ConvNextV2LayerNorm",
      "id": "embeddings.layernorm",
      "kind": "normalization",
      "path_pattern": "model.embeddings.layernorm"
    },
    {
      "children": [
        "encoder_conv_next_v2_stages"
      ],
      "class_name": "ConvNextV2Encoder",
      "id": "encoder",
      "kind": "encoder",
      "path_pattern": "model.encoder"
    },
    {
      "attributes": {
        "norm_type": "layer"
      },
      "class_name": "LayerNorm",
      "id": "layernorm",
      "kind": "normalization",
      "path_pattern": "model.layernorm"
    }
  ],
  "config": {
    "class_name": "ConvNextV2Config",
    "model_type": "convnextv2",
    "module": "transformers.models.convnextv2.configuration_convnextv2",
    "referenced_fields": {
      "depths": [
        3,
        3,
        9,
        3
      ]
    },
    "salient_fields": {
      "hidden_act": "gelu",
      "is_encoder_decoder": false
    }
  },
  "dataflow": {
    "input": {
      "name": "pixel_values",
      "shape": [
        "B",
        3,
        224,
        224
      ]
    },
    "output": {
      "shape": [
        "B",
        768,
        7,
        7
      ]
    },
    "shapes": {
      "embeddings": {
        "in": [
          "B",
          3,
          224,
          224
        ],
        "out": [
          "B",
          96,
          56,
          56
        ]
      },
      "encoder": {
        "in": [
          "B",
          96,
          56,
          56
        ],
        "out": [
          "B",
          768,
          7,
          7
        ]
      },
      "layernorm": {
        "in": [
          "B",
          768
        ],
        "out": [
          "B",
          768
        ]
      }
    },
    "source": "observed_forward_meta"
  },
  "edges": [
    {
      "kind": "data",
      "source": "embeddings",
      "target": "encoder"
    },
    {
      "kind": "data",
      "source": "encoder",
      "target": "layernorm"
    }
  ],
  "extends": null,
  "model_type": "convnextv2",
  "provenance": {
    "config_class": "ConvNextV2Config",
    "config_module": "transformers.models.convnextv2.configuration_convnextv2",
    "model_class": "ConvNextV2Model",
    "model_module": "transformers.models.convnextv2.modeling_convnextv2"
  },
  "repeats": [
    {
      "body": "encoder_conv_next_v2_stage",
      "container_path_pattern": "model.encoder.stages",
      "count": 4,
      "count_expr": "4",
      "count_source": "module_tree",
      "id": "encoder_conv_next_v2_stages",
      "index_symbol": "i",
      "item_path_pattern": "model.encoder.stages.{i}",
      "kind": "symbolic_repeat",
      "provenance": {
        "class_name": "ConvNextV2Stage",
        "container_path_pattern": "model.encoder.stages",
        "item_path_pattern": "model.encoder.stages.{i}",
        "source": "module_tree_repeat_collapse"
      },
      "repeated_class_name": "ConvNextV2Stage"
    },
    {
      "body": "encoder_layer",
      "container_path_pattern": "model.encoder.stages.{i}.layers",
      "count": 3,
      "count_expr": "config.depths[i]",
      "count_source": "config",
      "id": "encoder_layers",
      "index_symbol": "j",
      "item_path_pattern": "model.encoder.stages.{i}.layers.{j}",
      "kind": "symbolic_repeat",
      "provenance": {
        "class_name": "ConvNextV2Layer",
        "container_path_pattern": "model.encoder.stages.{i}.layers",
        "item_path_pattern": "model.encoder.stages.{i}.layers.{j}",
        "source": "module_tree_repeat_collapse"
      },
      "repeated_class_name": "ConvNextV2Layer"
    }
  ],
  "schema_version": "architecture-template-v0",
  "templates": [
    {
      "children": [
        "encoder_conv_next_v2_stage.downsampling_layer",
        "encoder_layers"
      ],
      "class_name": "ConvNextV2Stage",
      "id": "encoder_conv_next_v2_stage",
      "kind": "module",
      "path_pattern": "model.encoder.stages.{i}"
    },
    {
      "class_name": "ModuleList",
      "id": "encoder_conv_next_v2_stage.downsampling_layer",
      "kind": "repeated_container",
      "path_pattern": "model.encoder.stages.{i}.downsampling_layer"
    },
    {
      "children": [
        "encoder_layer.dwconv",
        "encoder_layer.layernorm"
      ],
      "class_name": "ConvNextV2Layer",
      "id": "encoder_layer",
      "kind": "convolution",
      "path_pattern": "model.encoder.stages.{i}.layers.{j}"
    },
    {
      "class_name": "Conv2d",
      "id": "encoder_layer.dwconv",
      "kind": "convolution",
      "path_pattern": "model.encoder.stages.{i}.layers.{j}.dwconv"
    },
    {
      "attributes": {
        "norm_type": "layer"
      },
      "class_name": "ConvNextV2LayerNorm",
      "id": "encoder_layer.layernorm",
      "kind": "normalization",
      "path_pattern": "model.encoder.stages.{i}.layers.{j}.layernorm"
    }
  ]
}