Upload model
Browse files- config.json +45 -0
- modelling_uniformer.py +0 -1
config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/datasets/work/hb-mlaifsp-mm/work/checkpoints/uniformer_base_tl_384",
|
3 |
+
"architectures": [
|
4 |
+
"UniFormerModel"
|
5 |
+
],
|
6 |
+
"attn_drop_rate": 0.0,
|
7 |
+
"auto_map": {
|
8 |
+
"AutoConfig": "configuration_uniformer.UniFormerWithProjectionHeadConfig",
|
9 |
+
"AutoModel": "modelling_uniformer.UniFormerModel"
|
10 |
+
},
|
11 |
+
"conv_stem": false,
|
12 |
+
"depth": [
|
13 |
+
5,
|
14 |
+
8,
|
15 |
+
20,
|
16 |
+
7
|
17 |
+
],
|
18 |
+
"drop_path_rate": 0.3,
|
19 |
+
"drop_rate": 0.0,
|
20 |
+
"embed_dim": [
|
21 |
+
64,
|
22 |
+
128,
|
23 |
+
320,
|
24 |
+
512
|
25 |
+
],
|
26 |
+
"head_dim": 64,
|
27 |
+
"image_size": 384,
|
28 |
+
"in_chans": 3,
|
29 |
+
"layer_norm_eps": 1e-06,
|
30 |
+
"mlp_ratio": 4,
|
31 |
+
"model_type": "uniformer",
|
32 |
+
"num_classes": 1000,
|
33 |
+
"patch_size": [
|
34 |
+
4,
|
35 |
+
2,
|
36 |
+
2,
|
37 |
+
2
|
38 |
+
],
|
39 |
+
"projection_size": null,
|
40 |
+
"qk_scale": null,
|
41 |
+
"qkv_bias": true,
|
42 |
+
"representation_size": null,
|
43 |
+
"torch_dtype": "float32",
|
44 |
+
"transformers_version": "4.39.3"
|
45 |
+
}
|
modelling_uniformer.py
CHANGED
@@ -6,7 +6,6 @@ from typing import Optional, Tuple, Union
|
|
6 |
import torch
|
7 |
import torch.nn as nn
|
8 |
from timm.models.layers import DropPath, to_2tuple, trunc_normal_
|
9 |
-
from transformers import ViTConfig
|
10 |
from transformers.modeling_outputs import ModelOutput
|
11 |
from transformers.modeling_utils import PreTrainedModel
|
12 |
from transformers.utils import logging
|
|
|
6 |
import torch
|
7 |
import torch.nn as nn
|
8 |
from timm.models.layers import DropPath, to_2tuple, trunc_normal_
|
|
|
9 |
from transformers.modeling_outputs import ModelOutput
|
10 |
from transformers.modeling_utils import PreTrainedModel
|
11 |
from transformers.utils import logging
|