Upload folder using huggingface_hub
Browse files- README.md +76 -0
- config.json +245 -0
- model.safetensors +3 -0
- preprocessor_config.json +22 -0
README.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: microsoft/resnet-152
|
| 3 |
+
library_name: transformers
|
| 4 |
+
tags:
|
| 5 |
+
- fusion-bench
|
| 6 |
+
- merge
|
| 7 |
+
---
|
| 8 |
+
# Deep Model Fusion
|
| 9 |
+
|
| 10 |
+
Fine-tuned ResNet model on dataset food101.
|
| 11 |
+
|
| 12 |
+
## Models Merged
|
| 13 |
+
|
| 14 |
+
This is a merged model created using [fusion-bench](https://github.com/tanganke/fusion_bench).
|
| 15 |
+
|
| 16 |
+
The following models were included in the merge:
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
## Configuration
|
| 22 |
+
|
| 23 |
+
The following YAML configuration was used to produce this model:
|
| 24 |
+
|
| 25 |
+
### Algorithm Configuration
|
| 26 |
+
|
| 27 |
+
```yaml
|
| 28 |
+
_recursive_: false
|
| 29 |
+
_target_: fusion_bench.method.classification.image_classification_finetune.ImageClassificationFineTuning
|
| 30 |
+
_usage_: null
|
| 31 |
+
_version_: 0.2.25.dev0
|
| 32 |
+
dataloader_kwargs:
|
| 33 |
+
batch_size: 64
|
| 34 |
+
num_workers: 8
|
| 35 |
+
pin_memory: true
|
| 36 |
+
label_smoothing: 0
|
| 37 |
+
lr_scheduler: null
|
| 38 |
+
max_epochs: -1
|
| 39 |
+
max_steps: 4000
|
| 40 |
+
optimizer:
|
| 41 |
+
_target_: torch.optim.SGD
|
| 42 |
+
lr: 0.005
|
| 43 |
+
momentum: 0.9
|
| 44 |
+
weight_decay: 0.0001
|
| 45 |
+
save_interval: 1000
|
| 46 |
+
save_on_train_epoch_end: false
|
| 47 |
+
save_top_k: -1
|
| 48 |
+
training_data_ratio: 0.5
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
### Model Pool Configuration
|
| 52 |
+
|
| 53 |
+
```yaml
|
| 54 |
+
_recursive_: false
|
| 55 |
+
_target_: fusion_bench.modelpool.resnet_for_image_classification.ResNetForImageClassificationPool
|
| 56 |
+
_usage_: null
|
| 57 |
+
_version_: 0.2.25.dev0
|
| 58 |
+
models:
|
| 59 |
+
_pretrained_:
|
| 60 |
+
config_path: microsoft/resnet-152
|
| 61 |
+
dataset_name: food101
|
| 62 |
+
pretrained: true
|
| 63 |
+
test_datasets: null
|
| 64 |
+
train_datasets:
|
| 65 |
+
food101:
|
| 66 |
+
_target_: datasets.load_dataset
|
| 67 |
+
path: ethz/food101
|
| 68 |
+
split: train
|
| 69 |
+
type: transformers
|
| 70 |
+
val_datasets:
|
| 71 |
+
food101:
|
| 72 |
+
_target_: datasets.load_dataset
|
| 73 |
+
path: ethz/food101
|
| 74 |
+
split: validation
|
| 75 |
+
```
|
| 76 |
+
|
config.json
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ResNetForImageClassification"
|
| 4 |
+
],
|
| 5 |
+
"depths": [
|
| 6 |
+
3,
|
| 7 |
+
8,
|
| 8 |
+
36,
|
| 9 |
+
3
|
| 10 |
+
],
|
| 11 |
+
"downsample_in_bottleneck": false,
|
| 12 |
+
"downsample_in_first_stage": false,
|
| 13 |
+
"dtype": "float32",
|
| 14 |
+
"embedding_size": 64,
|
| 15 |
+
"hidden_act": "relu",
|
| 16 |
+
"hidden_sizes": [
|
| 17 |
+
256,
|
| 18 |
+
512,
|
| 19 |
+
1024,
|
| 20 |
+
2048
|
| 21 |
+
],
|
| 22 |
+
"id2label": {
|
| 23 |
+
"0": "apple pie",
|
| 24 |
+
"1": "baby back ribs",
|
| 25 |
+
"2": "baklava",
|
| 26 |
+
"3": "beef carpaccio",
|
| 27 |
+
"4": "beef tartare",
|
| 28 |
+
"5": "beet salad",
|
| 29 |
+
"6": "beignets",
|
| 30 |
+
"7": "bibimbap",
|
| 31 |
+
"8": "bread pudding",
|
| 32 |
+
"9": "breakfast burrito",
|
| 33 |
+
"10": "bruschetta",
|
| 34 |
+
"11": "caesar salad",
|
| 35 |
+
"12": "cannoli",
|
| 36 |
+
"13": "caprese salad",
|
| 37 |
+
"14": "carrot cake",
|
| 38 |
+
"15": "ceviche",
|
| 39 |
+
"16": "cheese plate",
|
| 40 |
+
"17": "cheesecake",
|
| 41 |
+
"18": "chicken curry",
|
| 42 |
+
"19": "chicken quesadilla",
|
| 43 |
+
"20": "chicken wings",
|
| 44 |
+
"21": "chocolate cake",
|
| 45 |
+
"22": "chocolate mousse",
|
| 46 |
+
"23": "churros",
|
| 47 |
+
"24": "clam chowder",
|
| 48 |
+
"25": "club sandwich",
|
| 49 |
+
"26": "crab cakes",
|
| 50 |
+
"27": "creme brulee",
|
| 51 |
+
"28": "croque madame",
|
| 52 |
+
"29": "cup cakes",
|
| 53 |
+
"30": "deviled eggs",
|
| 54 |
+
"31": "donuts",
|
| 55 |
+
"32": "dumplings",
|
| 56 |
+
"33": "edamame",
|
| 57 |
+
"34": "eggs benedict",
|
| 58 |
+
"35": "escargots",
|
| 59 |
+
"36": "falafel",
|
| 60 |
+
"37": "filet mignon",
|
| 61 |
+
"38": "fish and chips",
|
| 62 |
+
"39": "foie gras",
|
| 63 |
+
"40": "french fries",
|
| 64 |
+
"41": "french onion soup",
|
| 65 |
+
"42": "french toast",
|
| 66 |
+
"43": "fried calamari",
|
| 67 |
+
"44": "fried rice",
|
| 68 |
+
"45": "frozen yogurt",
|
| 69 |
+
"46": "garlic bread",
|
| 70 |
+
"47": "gnocchi",
|
| 71 |
+
"48": "greek salad",
|
| 72 |
+
"49": "grilled cheese sandwich",
|
| 73 |
+
"50": "grilled salmon",
|
| 74 |
+
"51": "guacamole",
|
| 75 |
+
"52": "gyoza",
|
| 76 |
+
"53": "hamburger",
|
| 77 |
+
"54": "hot and sour soup",
|
| 78 |
+
"55": "hot dog",
|
| 79 |
+
"56": "huevos rancheros",
|
| 80 |
+
"57": "hummus",
|
| 81 |
+
"58": "ice cream",
|
| 82 |
+
"59": "lasagna",
|
| 83 |
+
"60": "lobster bisque",
|
| 84 |
+
"61": "lobster roll sandwich",
|
| 85 |
+
"62": "macaroni and cheese",
|
| 86 |
+
"63": "macarons",
|
| 87 |
+
"64": "miso soup",
|
| 88 |
+
"65": "mussels",
|
| 89 |
+
"66": "nachos",
|
| 90 |
+
"67": "omelette",
|
| 91 |
+
"68": "onion rings",
|
| 92 |
+
"69": "oysters",
|
| 93 |
+
"70": "pad thai",
|
| 94 |
+
"71": "paella",
|
| 95 |
+
"72": "pancakes",
|
| 96 |
+
"73": "panna cotta",
|
| 97 |
+
"74": "peking duck",
|
| 98 |
+
"75": "pho",
|
| 99 |
+
"76": "pizza",
|
| 100 |
+
"77": "pork chop",
|
| 101 |
+
"78": "poutine",
|
| 102 |
+
"79": "prime rib",
|
| 103 |
+
"80": "pulled pork sandwich",
|
| 104 |
+
"81": "ramen",
|
| 105 |
+
"82": "ravioli",
|
| 106 |
+
"83": "red velvet cake",
|
| 107 |
+
"84": "risotto",
|
| 108 |
+
"85": "samosa",
|
| 109 |
+
"86": "sashimi",
|
| 110 |
+
"87": "scallops",
|
| 111 |
+
"88": "seaweed salad",
|
| 112 |
+
"89": "shrimp and grits",
|
| 113 |
+
"90": "spaghetti bolognese",
|
| 114 |
+
"91": "spaghetti carbonara",
|
| 115 |
+
"92": "spring rolls",
|
| 116 |
+
"93": "steak",
|
| 117 |
+
"94": "strawberry shortcake",
|
| 118 |
+
"95": "sushi",
|
| 119 |
+
"96": "tacos",
|
| 120 |
+
"97": "takoyaki",
|
| 121 |
+
"98": "tiramisu",
|
| 122 |
+
"99": "tuna tartare",
|
| 123 |
+
"100": "waffles"
|
| 124 |
+
},
|
| 125 |
+
"label2id": {
|
| 126 |
+
"apple pie": 0,
|
| 127 |
+
"baby back ribs": 1,
|
| 128 |
+
"baklava": 2,
|
| 129 |
+
"beef carpaccio": 3,
|
| 130 |
+
"beef tartare": 4,
|
| 131 |
+
"beet salad": 5,
|
| 132 |
+
"beignets": 6,
|
| 133 |
+
"bibimbap": 7,
|
| 134 |
+
"bread pudding": 8,
|
| 135 |
+
"breakfast burrito": 9,
|
| 136 |
+
"bruschetta": 10,
|
| 137 |
+
"caesar salad": 11,
|
| 138 |
+
"cannoli": 12,
|
| 139 |
+
"caprese salad": 13,
|
| 140 |
+
"carrot cake": 14,
|
| 141 |
+
"ceviche": 15,
|
| 142 |
+
"cheese plate": 16,
|
| 143 |
+
"cheesecake": 17,
|
| 144 |
+
"chicken curry": 18,
|
| 145 |
+
"chicken quesadilla": 19,
|
| 146 |
+
"chicken wings": 20,
|
| 147 |
+
"chocolate cake": 21,
|
| 148 |
+
"chocolate mousse": 22,
|
| 149 |
+
"churros": 23,
|
| 150 |
+
"clam chowder": 24,
|
| 151 |
+
"club sandwich": 25,
|
| 152 |
+
"crab cakes": 26,
|
| 153 |
+
"creme brulee": 27,
|
| 154 |
+
"croque madame": 28,
|
| 155 |
+
"cup cakes": 29,
|
| 156 |
+
"deviled eggs": 30,
|
| 157 |
+
"donuts": 31,
|
| 158 |
+
"dumplings": 32,
|
| 159 |
+
"edamame": 33,
|
| 160 |
+
"eggs benedict": 34,
|
| 161 |
+
"escargots": 35,
|
| 162 |
+
"falafel": 36,
|
| 163 |
+
"filet mignon": 37,
|
| 164 |
+
"fish and chips": 38,
|
| 165 |
+
"foie gras": 39,
|
| 166 |
+
"french fries": 40,
|
| 167 |
+
"french onion soup": 41,
|
| 168 |
+
"french toast": 42,
|
| 169 |
+
"fried calamari": 43,
|
| 170 |
+
"fried rice": 44,
|
| 171 |
+
"frozen yogurt": 45,
|
| 172 |
+
"garlic bread": 46,
|
| 173 |
+
"gnocchi": 47,
|
| 174 |
+
"greek salad": 48,
|
| 175 |
+
"grilled cheese sandwich": 49,
|
| 176 |
+
"grilled salmon": 50,
|
| 177 |
+
"guacamole": 51,
|
| 178 |
+
"gyoza": 52,
|
| 179 |
+
"hamburger": 53,
|
| 180 |
+
"hot and sour soup": 54,
|
| 181 |
+
"hot dog": 55,
|
| 182 |
+
"huevos rancheros": 56,
|
| 183 |
+
"hummus": 57,
|
| 184 |
+
"ice cream": 58,
|
| 185 |
+
"lasagna": 59,
|
| 186 |
+
"lobster bisque": 60,
|
| 187 |
+
"lobster roll sandwich": 61,
|
| 188 |
+
"macaroni and cheese": 62,
|
| 189 |
+
"macarons": 63,
|
| 190 |
+
"miso soup": 64,
|
| 191 |
+
"mussels": 65,
|
| 192 |
+
"nachos": 66,
|
| 193 |
+
"omelette": 67,
|
| 194 |
+
"onion rings": 68,
|
| 195 |
+
"oysters": 69,
|
| 196 |
+
"pad thai": 70,
|
| 197 |
+
"paella": 71,
|
| 198 |
+
"pancakes": 72,
|
| 199 |
+
"panna cotta": 73,
|
| 200 |
+
"peking duck": 74,
|
| 201 |
+
"pho": 75,
|
| 202 |
+
"pizza": 76,
|
| 203 |
+
"pork chop": 77,
|
| 204 |
+
"poutine": 78,
|
| 205 |
+
"prime rib": 79,
|
| 206 |
+
"pulled pork sandwich": 80,
|
| 207 |
+
"ramen": 81,
|
| 208 |
+
"ravioli": 82,
|
| 209 |
+
"red velvet cake": 83,
|
| 210 |
+
"risotto": 84,
|
| 211 |
+
"samosa": 85,
|
| 212 |
+
"sashimi": 86,
|
| 213 |
+
"scallops": 87,
|
| 214 |
+
"seaweed salad": 88,
|
| 215 |
+
"shrimp and grits": 89,
|
| 216 |
+
"spaghetti bolognese": 90,
|
| 217 |
+
"spaghetti carbonara": 91,
|
| 218 |
+
"spring rolls": 92,
|
| 219 |
+
"steak": 93,
|
| 220 |
+
"strawberry shortcake": 94,
|
| 221 |
+
"sushi": 95,
|
| 222 |
+
"tacos": 96,
|
| 223 |
+
"takoyaki": 97,
|
| 224 |
+
"tiramisu": 98,
|
| 225 |
+
"tuna tartare": 99,
|
| 226 |
+
"waffles": 100
|
| 227 |
+
},
|
| 228 |
+
"layer_type": "bottleneck",
|
| 229 |
+
"model_type": "resnet",
|
| 230 |
+
"num_channels": 3,
|
| 231 |
+
"out_features": [
|
| 232 |
+
"stage4"
|
| 233 |
+
],
|
| 234 |
+
"out_indices": [
|
| 235 |
+
4
|
| 236 |
+
],
|
| 237 |
+
"stage_names": [
|
| 238 |
+
"stem",
|
| 239 |
+
"stage1",
|
| 240 |
+
"stage2",
|
| 241 |
+
"stage3",
|
| 242 |
+
"stage4"
|
| 243 |
+
],
|
| 244 |
+
"transformers_version": "4.56.1"
|
| 245 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42110aa0b0678b9e62a5de43316c75111fe12760ca9845a06e80f79c8c578ce9
|
| 3 |
+
size 234133348
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"crop_pct": 0.875,
|
| 3 |
+
"do_normalize": true,
|
| 4 |
+
"do_rescale": true,
|
| 5 |
+
"do_resize": true,
|
| 6 |
+
"image_mean": [
|
| 7 |
+
0.485,
|
| 8 |
+
0.456,
|
| 9 |
+
0.406
|
| 10 |
+
],
|
| 11 |
+
"image_processor_type": "ConvNextImageProcessor",
|
| 12 |
+
"image_std": [
|
| 13 |
+
0.229,
|
| 14 |
+
0.224,
|
| 15 |
+
0.225
|
| 16 |
+
],
|
| 17 |
+
"resample": 3,
|
| 18 |
+
"rescale_factor": 0.00392156862745098,
|
| 19 |
+
"size": {
|
| 20 |
+
"shortest_edge": 224
|
| 21 |
+
}
|
| 22 |
+
}
|