akashkau1224 commited on
Commit
115c800
·
verified ·
1 Parent(s): 7db6018

Upload 2 files

Browse files
Files changed (2) hide show
  1. README.md +132 -0
  2. sampleRun_v4.ipynb +1580 -0
README.md ADDED
@@ -0,0 +1,132 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LAJ CNN Image-to-GPS Model Iteration 1
2
+
3
+ This project features a convolutional neural network (CNN) for predicting GPS coordinates (latitude and longitude) from image inputs. Below, you'll find details on loading the model, performing inference, and the architecture of the network.
4
+
5
+ ---
6
+
7
+ ## 1. Loading the Model
8
+
9
+ To load the model, look at the sampleRun_v4.ipynb and run the same commands.
10
+
11
+ ## 2. Running the Model
12
+
13
+ To perform inference on our model, just normalize the latitudes and longitudes to our means and standard deviations below.
14
+ Then run code similar to the code provided to test code provided below:
15
+
16
+ ```
17
+ # Evaluate on Test Set
18
+ model.eval()
19
+ all_preds, all_actuals = [], []
20
+ with torch.no_grad():
21
+ for images, gps_coords in val_loader:
22
+ images, gps_coords = images.to(device), gps_coords.to(device)
23
+ outputs = model(images)
24
+ all_preds.append(outputs.cpu())
25
+ all_actuals.append(gps_coords.cpu())
26
+ all_preds = torch.cat(all_preds).numpy()
27
+ all_actuals = torch.cat(all_actuals).numpy()
28
+
29
+ # Denormalize Predictions
30
+ all_preds_denorm = all_preds * np.array([lat_std, lon_std]) + np.array([lat_mean, lon_mean])
31
+ all_actuals_denorm = all_actuals * np.array([lat_std, lon_std]) + np.array([lat_mean, lon_mean])
32
+
33
+ # Compute Error Metrics
34
+ mae = mean_absolute_error(all_actuals_denorm, all_preds_denorm)
35
+ rmse = mean_squared_error(all_actuals_denorm, all_preds_denorm, squared=False)
36
+ print(f"Test Set Mean Absolute Error: {mae:}")
37
+ print(f"Test Set Root Mean Squared Error: {rmse:}")
38
+ ```
39
+
40
+ ## 3. Latitude and Longitude Means and Standard Deviations
41
+
42
+ The following values represent the **means** and **standard deviations** of the latitude and longitude used in this model:
43
+
44
+ - **Latitude Mean**: `39.95173729922173`
45
+ - **Latitude Standard Deviation**: `0.0006877829213952256`
46
+ - **Longitude Mean**: `-75.19138804851796`
47
+ - **Longitude Standard Deviation**: `0.0006182574854250925`
48
+ These values are used to normalize and denormalize the latitude and longitude predictions during inference.
49
+
50
+ ## 4. CNN Architecture
51
+
52
+ Finally here is the architecture of the CNN we used:
53
+
54
+ ```
55
+
56
+ # Model Definition
57
+ class CustomGPSModel(nn.Module):
58
+ def __init__(self):
59
+ super(CustomGPSModel, self).__init__()
60
+
61
+ # Load EfficientNetV2-S with pretrained weights
62
+ self.efficientnet = efficientnet_v2_s(pretrained=True)
63
+
64
+ # Modify the final layer for regression (predicting latitude and longitude)
65
+ num_features = self.efficientnet.classifier[1].in_features
66
+ self.efficientnet.classifier[1] = nn.Linear(num_features, 2) # Output layer has 2 outputs for latitude & longitude
67
+
68
+ # Don't freeze earlier layers
69
+ for param in self.efficientnet.features.parameters():
70
+ param.requires_grad = True
71
+
72
+ def forward(self, x):
73
+ return self.efficientnet(x) # Forward pass through EfficientNet
74
+
75
+ ```
76
+
77
+ ## 5. Sample Run Code (how to install and run everything)
78
+
79
+ ```
80
+ !pip install datasets
81
+ !pip install huggingface_hub
82
+ !pip install requests
83
+ import torch
84
+ import torch.nn as nn
85
+ import torch.optim as optim
86
+ from torchvision.models import efficientnet_v2_s
87
+ from torch.optim.lr_scheduler import CosineAnnealingLR
88
+ from torchvision import transforms
89
+ from torch.utils.data import DataLoader, Dataset
90
+ from torchvision.transforms import functional as F
91
+ from PIL import Image
92
+ import numpy as np
93
+ from sklearn.metrics import mean_absolute_error, mean_squared_error
94
+ from huggingface_hub import PyTorchModelHubMixin
95
+ import os
96
+
97
+
98
+ # Model Definition
99
+ class CustomGPSModel(nn.Module):
100
+ def __init__(self):
101
+ super(CustomGPSModel, self).__init__()
102
+
103
+ # Load EfficientNetV2-S with pretrained weights
104
+ self.efficientnet = efficientnet_v2_s(pretrained=True)
105
+
106
+ # Modify the final layer for regression (predicting latitude and longitude)
107
+ num_features = self.efficientnet.classifier[1].in_features
108
+ self.efficientnet.classifier[1] = nn.Linear(num_features, 2) # Output layer has 2 outputs for latitude & longitude
109
+
110
+ # Don't freeze earlier layers
111
+ for param in self.efficientnet.features.parameters():
112
+ param.requires_grad = True
113
+
114
+ def forward(self, x):
115
+ return self.efficientnet(x) # Forward pass through EfficientNet
116
+
117
+ from huggingface_hub import hf_hub_download
118
+ import torch
119
+ path_name = "efficientnet_gps_regressor_complete_changed_betas_v2.pth"
120
+ repo_name = "CustomGPSModel_EfficientNetV2_Run3"
121
+ organization_name = "LAJ-519-Image-Project"
122
+
123
+ # Specify the repository and the filename of the model you want to load
124
+ repo_id = f"{organization_name}/{repo_name}"
125
+ filename = f"{path_name}"
126
+
127
+ model_path = hf_hub_download(repo_id=repo_id, filename=filename)
128
+
129
+ # Load the model using torch
130
+ model_test = torch.load(model_path)
131
+ model_test.eval()
132
+ ```
sampleRun_v4.ipynb ADDED
@@ -0,0 +1,1580 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "nbformat": 4,
3
+ "nbformat_minor": 0,
4
+ "metadata": {
5
+ "colab": {
6
+ "provenance": [],
7
+ "gpuType": "T4"
8
+ },
9
+ "kernelspec": {
10
+ "name": "python3",
11
+ "display_name": "Python 3"
12
+ },
13
+ "language_info": {
14
+ "name": "python"
15
+ },
16
+ "accelerator": "GPU",
17
+ "widgets": {
18
+ "application/vnd.jupyter.widget-state+json": {
19
+ "ea8bed4c2f59465c960a0f7959d11d5a": {
20
+ "model_module": "@jupyter-widgets/controls",
21
+ "model_name": "HBoxModel",
22
+ "model_module_version": "1.5.0",
23
+ "state": {
24
+ "_dom_classes": [],
25
+ "_model_module": "@jupyter-widgets/controls",
26
+ "_model_module_version": "1.5.0",
27
+ "_model_name": "HBoxModel",
28
+ "_view_count": null,
29
+ "_view_module": "@jupyter-widgets/controls",
30
+ "_view_module_version": "1.5.0",
31
+ "_view_name": "HBoxView",
32
+ "box_style": "",
33
+ "children": [
34
+ "IPY_MODEL_ba9f0a636b12483092c98a04425fabf3",
35
+ "IPY_MODEL_62270654be6d449e95ae164b45bedc7f",
36
+ "IPY_MODEL_b76d24c1fa2e4039a7ba04ca48c0a6fe"
37
+ ],
38
+ "layout": "IPY_MODEL_97f44ea194ef4907848c95520687b5d5"
39
+ }
40
+ },
41
+ "ba9f0a636b12483092c98a04425fabf3": {
42
+ "model_module": "@jupyter-widgets/controls",
43
+ "model_name": "HTMLModel",
44
+ "model_module_version": "1.5.0",
45
+ "state": {
46
+ "_dom_classes": [],
47
+ "_model_module": "@jupyter-widgets/controls",
48
+ "_model_module_version": "1.5.0",
49
+ "_model_name": "HTMLModel",
50
+ "_view_count": null,
51
+ "_view_module": "@jupyter-widgets/controls",
52
+ "_view_module_version": "1.5.0",
53
+ "_view_name": "HTMLView",
54
+ "description": "",
55
+ "description_tooltip": null,
56
+ "layout": "IPY_MODEL_a1d0729c068349818e258c1adafa0444",
57
+ "placeholder": "​",
58
+ "style": "IPY_MODEL_d5e5e8f006b24da282268d6169cb0d2d",
59
+ "value": "(…)gps_regressor_complete_changed_betas.pth: 100%"
60
+ }
61
+ },
62
+ "62270654be6d449e95ae164b45bedc7f": {
63
+ "model_module": "@jupyter-widgets/controls",
64
+ "model_name": "FloatProgressModel",
65
+ "model_module_version": "1.5.0",
66
+ "state": {
67
+ "_dom_classes": [],
68
+ "_model_module": "@jupyter-widgets/controls",
69
+ "_model_module_version": "1.5.0",
70
+ "_model_name": "FloatProgressModel",
71
+ "_view_count": null,
72
+ "_view_module": "@jupyter-widgets/controls",
73
+ "_view_module_version": "1.5.0",
74
+ "_view_name": "ProgressView",
75
+ "bar_style": "success",
76
+ "description": "",
77
+ "description_tooltip": null,
78
+ "layout": "IPY_MODEL_48807f50f9e94dacb2234a05e0d6b261",
79
+ "max": 81775818,
80
+ "min": 0,
81
+ "orientation": "horizontal",
82
+ "style": "IPY_MODEL_f6a23b7080bd4281ad660b06a2817e8b",
83
+ "value": 81775818
84
+ }
85
+ },
86
+ "b76d24c1fa2e4039a7ba04ca48c0a6fe": {
87
+ "model_module": "@jupyter-widgets/controls",
88
+ "model_name": "HTMLModel",
89
+ "model_module_version": "1.5.0",
90
+ "state": {
91
+ "_dom_classes": [],
92
+ "_model_module": "@jupyter-widgets/controls",
93
+ "_model_module_version": "1.5.0",
94
+ "_model_name": "HTMLModel",
95
+ "_view_count": null,
96
+ "_view_module": "@jupyter-widgets/controls",
97
+ "_view_module_version": "1.5.0",
98
+ "_view_name": "HTMLView",
99
+ "description": "",
100
+ "description_tooltip": null,
101
+ "layout": "IPY_MODEL_b8ddf21d3a104f35b6c978287e4bc550",
102
+ "placeholder": "​",
103
+ "style": "IPY_MODEL_00f4efad12aa4342a2b312ddc0c8d91c",
104
+ "value": " 81.8M/81.8M [00:03<00:00, 26.2MB/s]"
105
+ }
106
+ },
107
+ "97f44ea194ef4907848c95520687b5d5": {
108
+ "model_module": "@jupyter-widgets/base",
109
+ "model_name": "LayoutModel",
110
+ "model_module_version": "1.2.0",
111
+ "state": {
112
+ "_model_module": "@jupyter-widgets/base",
113
+ "_model_module_version": "1.2.0",
114
+ "_model_name": "LayoutModel",
115
+ "_view_count": null,
116
+ "_view_module": "@jupyter-widgets/base",
117
+ "_view_module_version": "1.2.0",
118
+ "_view_name": "LayoutView",
119
+ "align_content": null,
120
+ "align_items": null,
121
+ "align_self": null,
122
+ "border": null,
123
+ "bottom": null,
124
+ "display": null,
125
+ "flex": null,
126
+ "flex_flow": null,
127
+ "grid_area": null,
128
+ "grid_auto_columns": null,
129
+ "grid_auto_flow": null,
130
+ "grid_auto_rows": null,
131
+ "grid_column": null,
132
+ "grid_gap": null,
133
+ "grid_row": null,
134
+ "grid_template_areas": null,
135
+ "grid_template_columns": null,
136
+ "grid_template_rows": null,
137
+ "height": null,
138
+ "justify_content": null,
139
+ "justify_items": null,
140
+ "left": null,
141
+ "margin": null,
142
+ "max_height": null,
143
+ "max_width": null,
144
+ "min_height": null,
145
+ "min_width": null,
146
+ "object_fit": null,
147
+ "object_position": null,
148
+ "order": null,
149
+ "overflow": null,
150
+ "overflow_x": null,
151
+ "overflow_y": null,
152
+ "padding": null,
153
+ "right": null,
154
+ "top": null,
155
+ "visibility": null,
156
+ "width": null
157
+ }
158
+ },
159
+ "a1d0729c068349818e258c1adafa0444": {
160
+ "model_module": "@jupyter-widgets/base",
161
+ "model_name": "LayoutModel",
162
+ "model_module_version": "1.2.0",
163
+ "state": {
164
+ "_model_module": "@jupyter-widgets/base",
165
+ "_model_module_version": "1.2.0",
166
+ "_model_name": "LayoutModel",
167
+ "_view_count": null,
168
+ "_view_module": "@jupyter-widgets/base",
169
+ "_view_module_version": "1.2.0",
170
+ "_view_name": "LayoutView",
171
+ "align_content": null,
172
+ "align_items": null,
173
+ "align_self": null,
174
+ "border": null,
175
+ "bottom": null,
176
+ "display": null,
177
+ "flex": null,
178
+ "flex_flow": null,
179
+ "grid_area": null,
180
+ "grid_auto_columns": null,
181
+ "grid_auto_flow": null,
182
+ "grid_auto_rows": null,
183
+ "grid_column": null,
184
+ "grid_gap": null,
185
+ "grid_row": null,
186
+ "grid_template_areas": null,
187
+ "grid_template_columns": null,
188
+ "grid_template_rows": null,
189
+ "height": null,
190
+ "justify_content": null,
191
+ "justify_items": null,
192
+ "left": null,
193
+ "margin": null,
194
+ "max_height": null,
195
+ "max_width": null,
196
+ "min_height": null,
197
+ "min_width": null,
198
+ "object_fit": null,
199
+ "object_position": null,
200
+ "order": null,
201
+ "overflow": null,
202
+ "overflow_x": null,
203
+ "overflow_y": null,
204
+ "padding": null,
205
+ "right": null,
206
+ "top": null,
207
+ "visibility": null,
208
+ "width": null
209
+ }
210
+ },
211
+ "d5e5e8f006b24da282268d6169cb0d2d": {
212
+ "model_module": "@jupyter-widgets/controls",
213
+ "model_name": "DescriptionStyleModel",
214
+ "model_module_version": "1.5.0",
215
+ "state": {
216
+ "_model_module": "@jupyter-widgets/controls",
217
+ "_model_module_version": "1.5.0",
218
+ "_model_name": "DescriptionStyleModel",
219
+ "_view_count": null,
220
+ "_view_module": "@jupyter-widgets/base",
221
+ "_view_module_version": "1.2.0",
222
+ "_view_name": "StyleView",
223
+ "description_width": ""
224
+ }
225
+ },
226
+ "48807f50f9e94dacb2234a05e0d6b261": {
227
+ "model_module": "@jupyter-widgets/base",
228
+ "model_name": "LayoutModel",
229
+ "model_module_version": "1.2.0",
230
+ "state": {
231
+ "_model_module": "@jupyter-widgets/base",
232
+ "_model_module_version": "1.2.0",
233
+ "_model_name": "LayoutModel",
234
+ "_view_count": null,
235
+ "_view_module": "@jupyter-widgets/base",
236
+ "_view_module_version": "1.2.0",
237
+ "_view_name": "LayoutView",
238
+ "align_content": null,
239
+ "align_items": null,
240
+ "align_self": null,
241
+ "border": null,
242
+ "bottom": null,
243
+ "display": null,
244
+ "flex": null,
245
+ "flex_flow": null,
246
+ "grid_area": null,
247
+ "grid_auto_columns": null,
248
+ "grid_auto_flow": null,
249
+ "grid_auto_rows": null,
250
+ "grid_column": null,
251
+ "grid_gap": null,
252
+ "grid_row": null,
253
+ "grid_template_areas": null,
254
+ "grid_template_columns": null,
255
+ "grid_template_rows": null,
256
+ "height": null,
257
+ "justify_content": null,
258
+ "justify_items": null,
259
+ "left": null,
260
+ "margin": null,
261
+ "max_height": null,
262
+ "max_width": null,
263
+ "min_height": null,
264
+ "min_width": null,
265
+ "object_fit": null,
266
+ "object_position": null,
267
+ "order": null,
268
+ "overflow": null,
269
+ "overflow_x": null,
270
+ "overflow_y": null,
271
+ "padding": null,
272
+ "right": null,
273
+ "top": null,
274
+ "visibility": null,
275
+ "width": null
276
+ }
277
+ },
278
+ "f6a23b7080bd4281ad660b06a2817e8b": {
279
+ "model_module": "@jupyter-widgets/controls",
280
+ "model_name": "ProgressStyleModel",
281
+ "model_module_version": "1.5.0",
282
+ "state": {
283
+ "_model_module": "@jupyter-widgets/controls",
284
+ "_model_module_version": "1.5.0",
285
+ "_model_name": "ProgressStyleModel",
286
+ "_view_count": null,
287
+ "_view_module": "@jupyter-widgets/base",
288
+ "_view_module_version": "1.2.0",
289
+ "_view_name": "StyleView",
290
+ "bar_color": null,
291
+ "description_width": ""
292
+ }
293
+ },
294
+ "b8ddf21d3a104f35b6c978287e4bc550": {
295
+ "model_module": "@jupyter-widgets/base",
296
+ "model_name": "LayoutModel",
297
+ "model_module_version": "1.2.0",
298
+ "state": {
299
+ "_model_module": "@jupyter-widgets/base",
300
+ "_model_module_version": "1.2.0",
301
+ "_model_name": "LayoutModel",
302
+ "_view_count": null,
303
+ "_view_module": "@jupyter-widgets/base",
304
+ "_view_module_version": "1.2.0",
305
+ "_view_name": "LayoutView",
306
+ "align_content": null,
307
+ "align_items": null,
308
+ "align_self": null,
309
+ "border": null,
310
+ "bottom": null,
311
+ "display": null,
312
+ "flex": null,
313
+ "flex_flow": null,
314
+ "grid_area": null,
315
+ "grid_auto_columns": null,
316
+ "grid_auto_flow": null,
317
+ "grid_auto_rows": null,
318
+ "grid_column": null,
319
+ "grid_gap": null,
320
+ "grid_row": null,
321
+ "grid_template_areas": null,
322
+ "grid_template_columns": null,
323
+ "grid_template_rows": null,
324
+ "height": null,
325
+ "justify_content": null,
326
+ "justify_items": null,
327
+ "left": null,
328
+ "margin": null,
329
+ "max_height": null,
330
+ "max_width": null,
331
+ "min_height": null,
332
+ "min_width": null,
333
+ "object_fit": null,
334
+ "object_position": null,
335
+ "order": null,
336
+ "overflow": null,
337
+ "overflow_x": null,
338
+ "overflow_y": null,
339
+ "padding": null,
340
+ "right": null,
341
+ "top": null,
342
+ "visibility": null,
343
+ "width": null
344
+ }
345
+ },
346
+ "00f4efad12aa4342a2b312ddc0c8d91c": {
347
+ "model_module": "@jupyter-widgets/controls",
348
+ "model_name": "DescriptionStyleModel",
349
+ "model_module_version": "1.5.0",
350
+ "state": {
351
+ "_model_module": "@jupyter-widgets/controls",
352
+ "_model_module_version": "1.5.0",
353
+ "_model_name": "DescriptionStyleModel",
354
+ "_view_count": null,
355
+ "_view_module": "@jupyter-widgets/base",
356
+ "_view_module_version": "1.2.0",
357
+ "_view_name": "StyleView",
358
+ "description_width": ""
359
+ }
360
+ }
361
+ }
362
+ }
363
+ },
364
+ "cells": [
365
+ {
366
+ "cell_type": "code",
367
+ "execution_count": null,
368
+ "metadata": {
369
+ "colab": {
370
+ "base_uri": "https://localhost:8080/"
371
+ },
372
+ "id": "uoEz8DyTYUts",
373
+ "outputId": "9fcffbe6-f9a0-4848-c83f-4463f73631c5"
374
+ },
375
+ "outputs": [
376
+ {
377
+ "output_type": "stream",
378
+ "name": "stdout",
379
+ "text": [
380
+ "Collecting datasets\n",
381
+ " Downloading datasets-3.2.0-py3-none-any.whl.metadata (20 kB)\n",
382
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from datasets) (3.16.1)\n",
383
+ "Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.26.4)\n",
384
+ "Requirement already satisfied: pyarrow>=15.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (17.0.0)\n",
385
+ "Collecting dill<0.3.9,>=0.3.0 (from datasets)\n",
386
+ " Downloading dill-0.3.8-py3-none-any.whl.metadata (10 kB)\n",
387
+ "Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (2.2.2)\n",
388
+ "Requirement already satisfied: requests>=2.32.2 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.32.3)\n",
389
+ "Requirement already satisfied: tqdm>=4.66.3 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.66.6)\n",
390
+ "Collecting xxhash (from datasets)\n",
391
+ " Downloading xxhash-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (12 kB)\n",
392
+ "Collecting multiprocess<0.70.17 (from datasets)\n",
393
+ " Downloading multiprocess-0.70.16-py310-none-any.whl.metadata (7.2 kB)\n",
394
+ "Collecting fsspec<=2024.9.0,>=2023.1.0 (from fsspec[http]<=2024.9.0,>=2023.1.0->datasets)\n",
395
+ " Downloading fsspec-2024.9.0-py3-none-any.whl.metadata (11 kB)\n",
396
+ "Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.11.10)\n",
397
+ "Requirement already satisfied: huggingface-hub>=0.23.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.26.5)\n",
398
+ "Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (24.2)\n",
399
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0.2)\n",
400
+ "Requirement already satisfied: aiohappyeyeballs>=2.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (2.4.4)\n",
401
+ "Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n",
402
+ "Requirement already satisfied: async-timeout<6.0,>=4.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.3)\n",
403
+ "Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (24.2.0)\n",
404
+ "Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.5.0)\n",
405
+ "Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.1.0)\n",
406
+ "Requirement already satisfied: propcache>=0.2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (0.2.1)\n",
407
+ "Requirement already satisfied: yarl<2.0,>=1.17.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.18.3)\n",
408
+ "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.23.0->datasets) (4.12.2)\n",
409
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.4.0)\n",
410
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (3.10)\n",
411
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2.2.3)\n",
412
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.32.2->datasets) (2024.8.30)\n",
413
+ "Requirement already satisfied: python-dateutil>=2.8.2 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n",
414
+ "Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.2)\n",
415
+ "Requirement already satisfied: tzdata>=2022.7 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2024.2)\n",
416
+ "Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.2->pandas->datasets) (1.17.0)\n",
417
+ "Downloading datasets-3.2.0-py3-none-any.whl (480 kB)\n",
418
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m480.6/480.6 kB\u001b[0m \u001b[31m15.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
419
+ "\u001b[?25hDownloading dill-0.3.8-py3-none-any.whl (116 kB)\n",
420
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m116.3/116.3 kB\u001b[0m \u001b[31m2.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
421
+ "\u001b[?25hDownloading fsspec-2024.9.0-py3-none-any.whl (179 kB)\n",
422
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m179.3/179.3 kB\u001b[0m \u001b[31m9.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
423
+ "\u001b[?25hDownloading multiprocess-0.70.16-py310-none-any.whl (134 kB)\n",
424
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m134.8/134.8 kB\u001b[0m \u001b[31m7.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
425
+ "\u001b[?25hDownloading xxhash-3.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (194 kB)\n",
426
+ "\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m194.1/194.1 kB\u001b[0m \u001b[31m6.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n",
427
+ "\u001b[?25hInstalling collected packages: xxhash, fsspec, dill, multiprocess, datasets\n",
428
+ " Attempting uninstall: fsspec\n",
429
+ " Found existing installation: fsspec 2024.10.0\n",
430
+ " Uninstalling fsspec-2024.10.0:\n",
431
+ " Successfully uninstalled fsspec-2024.10.0\n",
432
+ "\u001b[31mERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.\n",
433
+ "gcsfs 2024.10.0 requires fsspec==2024.10.0, but you have fsspec 2024.9.0 which is incompatible.\u001b[0m\u001b[31m\n",
434
+ "\u001b[0mSuccessfully installed datasets-3.2.0 dill-0.3.8 fsspec-2024.9.0 multiprocess-0.70.16 xxhash-3.5.0\n"
435
+ ]
436
+ }
437
+ ],
438
+ "source": [
439
+ "!pip install datasets"
440
+ ]
441
+ },
442
+ {
443
+ "cell_type": "code",
444
+ "source": [
445
+ "!pip install huggingface_hub"
446
+ ],
447
+ "metadata": {
448
+ "colab": {
449
+ "base_uri": "https://localhost:8080/"
450
+ },
451
+ "id": "pnoqloVaYcZc",
452
+ "outputId": "f5d8c8c2-5c6d-4b95-b10a-1d2b95be1d1d"
453
+ },
454
+ "execution_count": null,
455
+ "outputs": [
456
+ {
457
+ "output_type": "stream",
458
+ "name": "stdout",
459
+ "text": [
460
+ "Requirement already satisfied: huggingface_hub in /usr/local/lib/python3.10/dist-packages (0.26.5)\n",
461
+ "Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (3.16.1)\n",
462
+ "Requirement already satisfied: fsspec>=2023.5.0 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2024.9.0)\n",
463
+ "Requirement already satisfied: packaging>=20.9 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (24.2)\n",
464
+ "Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (6.0.2)\n",
465
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (2.32.3)\n",
466
+ "Requirement already satisfied: tqdm>=4.42.1 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.66.6)\n",
467
+ "Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface_hub) (4.12.2)\n",
468
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.4.0)\n",
469
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (3.10)\n",
470
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2.2.3)\n",
471
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->huggingface_hub) (2024.8.30)\n"
472
+ ]
473
+ }
474
+ ]
475
+ },
476
+ {
477
+ "cell_type": "code",
478
+ "source": [
479
+ "!pip install requests"
480
+ ],
481
+ "metadata": {
482
+ "colab": {
483
+ "base_uri": "https://localhost:8080/"
484
+ },
485
+ "id": "AV0maTmHY-ub",
486
+ "outputId": "e79de750-361d-4272-fcd7-fc83bde58d6d"
487
+ },
488
+ "execution_count": null,
489
+ "outputs": [
490
+ {
491
+ "output_type": "stream",
492
+ "name": "stdout",
493
+ "text": [
494
+ "Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (2.32.3)\n",
495
+ "Requirement already satisfied: charset-normalizer<4,>=2 in /usr/local/lib/python3.10/dist-packages (from requests) (3.4.0)\n",
496
+ "Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests) (3.10)\n",
497
+ "Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests) (2.2.3)\n",
498
+ "Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests) (2024.8.30)\n"
499
+ ]
500
+ }
501
+ ]
502
+ },
503
+ {
504
+ "cell_type": "code",
505
+ "source": [
506
+ "import torch\n",
507
+ "import torch.nn as nn\n",
508
+ "import torch.optim as optim\n",
509
+ "from torchvision.models import efficientnet_v2_s\n",
510
+ "from torch.optim.lr_scheduler import CosineAnnealingLR\n",
511
+ "from torchvision import transforms\n",
512
+ "from torch.utils.data import DataLoader, Dataset\n",
513
+ "from torchvision.transforms import functional as F\n",
514
+ "from PIL import Image\n",
515
+ "import numpy as np\n",
516
+ "from sklearn.metrics import mean_absolute_error, mean_squared_error\n",
517
+ "from huggingface_hub import PyTorchModelHubMixin\n",
518
+ "import os\n",
519
+ "\n",
520
+ "\n",
521
+ "# Model Definition\n",
522
+ "class CustomGPSModel(nn.Module):\n",
523
+ " def __init__(self):\n",
524
+ " super(CustomGPSModel, self).__init__()\n",
525
+ "\n",
526
+ " # Load EfficientNetV2-S with pretrained weights\n",
527
+ " self.efficientnet = efficientnet_v2_s(pretrained=True)\n",
528
+ "\n",
529
+ " # Modify the final layer for regression (predicting latitude and longitude)\n",
530
+ " num_features = self.efficientnet.classifier[1].in_features\n",
531
+ " self.efficientnet.classifier[1] = nn.Linear(num_features, 2) # Output layer has 2 outputs for latitude & longitude\n",
532
+ "\n",
533
+ " # Don't freeze earlier layers\n",
534
+ " for param in self.efficientnet.features.parameters():\n",
535
+ " param.requires_grad = True\n",
536
+ "\n",
537
+ " def forward(self, x):\n",
538
+ " return self.efficientnet(x) # Forward pass through EfficientNet"
539
+ ],
540
+ "metadata": {
541
+ "id": "uBlw8T7r-EmY"
542
+ },
543
+ "execution_count": null,
544
+ "outputs": []
545
+ },
546
+ {
547
+ "cell_type": "code",
548
+ "source": [
549
+ "from huggingface_hub import hf_hub_download\n",
550
+ "import torch\n",
551
+ "\n",
552
+ "path_name = \"efficientnet_gps_regressor_complete_changed_betas_v2.pth\"\n",
553
+ "repo_name = \"CustomGPSModel_EfficientNetV2_Run3\"\n",
554
+ "organization_name = \"LAJ-519-Image-Project\"\n",
555
+ "\n",
556
+ "# Specify the repository and the filename of the model you want to load\n",
557
+ "repo_id = f\"{organization_name}/{repo_name}\"\n",
558
+ "filename = f\"{path_name}\"\n",
559
+ "\n",
560
+ "model_path = hf_hub_download(repo_id=repo_id, filename=filename)\n",
561
+ "\n",
562
+ "# Load the model using torch\n",
563
+ "model_test = torch.load(model_path)\n",
564
+ "model_test.eval()"
565
+ ],
566
+ "metadata": {
567
+ "colab": {
568
+ "base_uri": "https://localhost:8080/",
569
+ "height": 1000,
570
+ "referenced_widgets": [
571
+ "ea8bed4c2f59465c960a0f7959d11d5a",
572
+ "ba9f0a636b12483092c98a04425fabf3",
573
+ "62270654be6d449e95ae164b45bedc7f",
574
+ "b76d24c1fa2e4039a7ba04ca48c0a6fe",
575
+ "97f44ea194ef4907848c95520687b5d5",
576
+ "a1d0729c068349818e258c1adafa0444",
577
+ "d5e5e8f006b24da282268d6169cb0d2d",
578
+ "48807f50f9e94dacb2234a05e0d6b261",
579
+ "f6a23b7080bd4281ad660b06a2817e8b",
580
+ "b8ddf21d3a104f35b6c978287e4bc550",
581
+ "00f4efad12aa4342a2b312ddc0c8d91c"
582
+ ]
583
+ },
584
+ "id": "eVrRN-sKZQbq",
585
+ "outputId": "6ac1b12c-0128-4333-e513-d83cc24abf0f"
586
+ },
587
+ "execution_count": null,
588
+ "outputs": [
589
+ {
590
+ "output_type": "stream",
591
+ "name": "stderr",
592
+ "text": [
593
+ "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_auth.py:94: UserWarning: \n",
594
+ "The secret `HF_TOKEN` does not exist in your Colab secrets.\n",
595
+ "To authenticate with the Hugging Face Hub, create a token in your settings tab (https://huggingface.co/settings/tokens), set it as secret in your Google Colab and restart your session.\n",
596
+ "You will be able to reuse this secret in all of your notebooks.\n",
597
+ "Please note that authentication is recommended but still optional to access public models or datasets.\n",
598
+ " warnings.warn(\n"
599
+ ]
600
+ },
601
+ {
602
+ "output_type": "display_data",
603
+ "data": {
604
+ "text/plain": [
605
+ "(…)gps_regressor_complete_changed_betas.pth: 0%| | 0.00/81.8M [00:00<?, ?B/s]"
606
+ ],
607
+ "application/vnd.jupyter.widget-view+json": {
608
+ "version_major": 2,
609
+ "version_minor": 0,
610
+ "model_id": "ea8bed4c2f59465c960a0f7959d11d5a"
611
+ }
612
+ },
613
+ "metadata": {}
614
+ },
615
+ {
616
+ "output_type": "stream",
617
+ "name": "stderr",
618
+ "text": [
619
+ "<ipython-input-5-e047d6f1184c>:15: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.\n",
620
+ " model_test = torch.load(model_path)\n"
621
+ ]
622
+ },
623
+ {
624
+ "output_type": "execute_result",
625
+ "data": {
626
+ "text/plain": [
627
+ "CustomGPSModel(\n",
628
+ " (efficientnet): EfficientNet(\n",
629
+ " (features): Sequential(\n",
630
+ " (0): Conv2dNormActivation(\n",
631
+ " (0): Conv2d(3, 24, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n",
632
+ " (1): BatchNorm2d(24, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
633
+ " (2): SiLU(inplace=True)\n",
634
+ " )\n",
635
+ " (1): Sequential(\n",
636
+ " (0): FusedMBConv(\n",
637
+ " (block): Sequential(\n",
638
+ " (0): Conv2dNormActivation(\n",
639
+ " (0): Conv2d(24, 24, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n",
640
+ " (1): BatchNorm2d(24, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
641
+ " (2): SiLU(inplace=True)\n",
642
+ " )\n",
643
+ " )\n",
644
+ " (stochastic_depth): StochasticDepth(p=0.0, mode=row)\n",
645
+ " )\n",
646
+ " (1): FusedMBConv(\n",
647
+ " (block): Sequential(\n",
648
+ " (0): Conv2dNormActivation(\n",
649
+ " (0): Conv2d(24, 24, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n",
650
+ " (1): BatchNorm2d(24, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
651
+ " (2): SiLU(inplace=True)\n",
652
+ " )\n",
653
+ " )\n",
654
+ " (stochastic_depth): StochasticDepth(p=0.005, mode=row)\n",
655
+ " )\n",
656
+ " )\n",
657
+ " (2): Sequential(\n",
658
+ " (0): FusedMBConv(\n",
659
+ " (block): Sequential(\n",
660
+ " (0): Conv2dNormActivation(\n",
661
+ " (0): Conv2d(24, 96, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n",
662
+ " (1): BatchNorm2d(96, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
663
+ " (2): SiLU(inplace=True)\n",
664
+ " )\n",
665
+ " (1): Conv2dNormActivation(\n",
666
+ " (0): Conv2d(96, 48, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
667
+ " (1): BatchNorm2d(48, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
668
+ " )\n",
669
+ " )\n",
670
+ " (stochastic_depth): StochasticDepth(p=0.01, mode=row)\n",
671
+ " )\n",
672
+ " (1): FusedMBConv(\n",
673
+ " (block): Sequential(\n",
674
+ " (0): Conv2dNormActivation(\n",
675
+ " (0): Conv2d(48, 192, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n",
676
+ " (1): BatchNorm2d(192, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
677
+ " (2): SiLU(inplace=True)\n",
678
+ " )\n",
679
+ " (1): Conv2dNormActivation(\n",
680
+ " (0): Conv2d(192, 48, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
681
+ " (1): BatchNorm2d(48, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
682
+ " )\n",
683
+ " )\n",
684
+ " (stochastic_depth): StochasticDepth(p=0.015000000000000003, mode=row)\n",
685
+ " )\n",
686
+ " (2): FusedMBConv(\n",
687
+ " (block): Sequential(\n",
688
+ " (0): Conv2dNormActivation(\n",
689
+ " (0): Conv2d(48, 192, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n",
690
+ " (1): BatchNorm2d(192, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
691
+ " (2): SiLU(inplace=True)\n",
692
+ " )\n",
693
+ " (1): Conv2dNormActivation(\n",
694
+ " (0): Conv2d(192, 48, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
695
+ " (1): BatchNorm2d(48, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
696
+ " )\n",
697
+ " )\n",
698
+ " (stochastic_depth): StochasticDepth(p=0.02, mode=row)\n",
699
+ " )\n",
700
+ " (3): FusedMBConv(\n",
701
+ " (block): Sequential(\n",
702
+ " (0): Conv2dNormActivation(\n",
703
+ " (0): Conv2d(48, 192, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n",
704
+ " (1): BatchNorm2d(192, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
705
+ " (2): SiLU(inplace=True)\n",
706
+ " )\n",
707
+ " (1): Conv2dNormActivation(\n",
708
+ " (0): Conv2d(192, 48, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
709
+ " (1): BatchNorm2d(48, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
710
+ " )\n",
711
+ " )\n",
712
+ " (stochastic_depth): StochasticDepth(p=0.025, mode=row)\n",
713
+ " )\n",
714
+ " )\n",
715
+ " (3): Sequential(\n",
716
+ " (0): FusedMBConv(\n",
717
+ " (block): Sequential(\n",
718
+ " (0): Conv2dNormActivation(\n",
719
+ " (0): Conv2d(48, 192, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), bias=False)\n",
720
+ " (1): BatchNorm2d(192, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
721
+ " (2): SiLU(inplace=True)\n",
722
+ " )\n",
723
+ " (1): Conv2dNormActivation(\n",
724
+ " (0): Conv2d(192, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
725
+ " (1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
726
+ " )\n",
727
+ " )\n",
728
+ " (stochastic_depth): StochasticDepth(p=0.030000000000000006, mode=row)\n",
729
+ " )\n",
730
+ " (1): FusedMBConv(\n",
731
+ " (block): Sequential(\n",
732
+ " (0): Conv2dNormActivation(\n",
733
+ " (0): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n",
734
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
735
+ " (2): SiLU(inplace=True)\n",
736
+ " )\n",
737
+ " (1): Conv2dNormActivation(\n",
738
+ " (0): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
739
+ " (1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
740
+ " )\n",
741
+ " )\n",
742
+ " (stochastic_depth): StochasticDepth(p=0.035, mode=row)\n",
743
+ " )\n",
744
+ " (2): FusedMBConv(\n",
745
+ " (block): Sequential(\n",
746
+ " (0): Conv2dNormActivation(\n",
747
+ " (0): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n",
748
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
749
+ " (2): SiLU(inplace=True)\n",
750
+ " )\n",
751
+ " (1): Conv2dNormActivation(\n",
752
+ " (0): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
753
+ " (1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
754
+ " )\n",
755
+ " )\n",
756
+ " (stochastic_depth): StochasticDepth(p=0.04, mode=row)\n",
757
+ " )\n",
758
+ " (3): FusedMBConv(\n",
759
+ " (block): Sequential(\n",
760
+ " (0): Conv2dNormActivation(\n",
761
+ " (0): Conv2d(64, 256, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False)\n",
762
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
763
+ " (2): SiLU(inplace=True)\n",
764
+ " )\n",
765
+ " (1): Conv2dNormActivation(\n",
766
+ " (0): Conv2d(256, 64, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
767
+ " (1): BatchNorm2d(64, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
768
+ " )\n",
769
+ " )\n",
770
+ " (stochastic_depth): StochasticDepth(p=0.045, mode=row)\n",
771
+ " )\n",
772
+ " )\n",
773
+ " (4): Sequential(\n",
774
+ " (0): MBConv(\n",
775
+ " (block): Sequential(\n",
776
+ " (0): Conv2dNormActivation(\n",
777
+ " (0): Conv2d(64, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
778
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
779
+ " (2): SiLU(inplace=True)\n",
780
+ " )\n",
781
+ " (1): Conv2dNormActivation(\n",
782
+ " (0): Conv2d(256, 256, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), groups=256, bias=False)\n",
783
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
784
+ " (2): SiLU(inplace=True)\n",
785
+ " )\n",
786
+ " (2): SqueezeExcitation(\n",
787
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
788
+ " (fc1): Conv2d(256, 16, kernel_size=(1, 1), stride=(1, 1))\n",
789
+ " (fc2): Conv2d(16, 256, kernel_size=(1, 1), stride=(1, 1))\n",
790
+ " (activation): SiLU(inplace=True)\n",
791
+ " (scale_activation): Sigmoid()\n",
792
+ " )\n",
793
+ " (3): Conv2dNormActivation(\n",
794
+ " (0): Conv2d(256, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
795
+ " (1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
796
+ " )\n",
797
+ " )\n",
798
+ " (stochastic_depth): StochasticDepth(p=0.05, mode=row)\n",
799
+ " )\n",
800
+ " (1): MBConv(\n",
801
+ " (block): Sequential(\n",
802
+ " (0): Conv2dNormActivation(\n",
803
+ " (0): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
804
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
805
+ " (2): SiLU(inplace=True)\n",
806
+ " )\n",
807
+ " (1): Conv2dNormActivation(\n",
808
+ " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=512, bias=False)\n",
809
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
810
+ " (2): SiLU(inplace=True)\n",
811
+ " )\n",
812
+ " (2): SqueezeExcitation(\n",
813
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
814
+ " (fc1): Conv2d(512, 32, kernel_size=(1, 1), stride=(1, 1))\n",
815
+ " (fc2): Conv2d(32, 512, kernel_size=(1, 1), stride=(1, 1))\n",
816
+ " (activation): SiLU(inplace=True)\n",
817
+ " (scale_activation): Sigmoid()\n",
818
+ " )\n",
819
+ " (3): Conv2dNormActivation(\n",
820
+ " (0): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
821
+ " (1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
822
+ " )\n",
823
+ " )\n",
824
+ " (stochastic_depth): StochasticDepth(p=0.05500000000000001, mode=row)\n",
825
+ " )\n",
826
+ " (2): MBConv(\n",
827
+ " (block): Sequential(\n",
828
+ " (0): Conv2dNormActivation(\n",
829
+ " (0): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
830
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
831
+ " (2): SiLU(inplace=True)\n",
832
+ " )\n",
833
+ " (1): Conv2dNormActivation(\n",
834
+ " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=512, bias=False)\n",
835
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
836
+ " (2): SiLU(inplace=True)\n",
837
+ " )\n",
838
+ " (2): SqueezeExcitation(\n",
839
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
840
+ " (fc1): Conv2d(512, 32, kernel_size=(1, 1), stride=(1, 1))\n",
841
+ " (fc2): Conv2d(32, 512, kernel_size=(1, 1), stride=(1, 1))\n",
842
+ " (activation): SiLU(inplace=True)\n",
843
+ " (scale_activation): Sigmoid()\n",
844
+ " )\n",
845
+ " (3): Conv2dNormActivation(\n",
846
+ " (0): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
847
+ " (1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
848
+ " )\n",
849
+ " )\n",
850
+ " (stochastic_depth): StochasticDepth(p=0.06000000000000001, mode=row)\n",
851
+ " )\n",
852
+ " (3): MBConv(\n",
853
+ " (block): Sequential(\n",
854
+ " (0): Conv2dNormActivation(\n",
855
+ " (0): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
856
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
857
+ " (2): SiLU(inplace=True)\n",
858
+ " )\n",
859
+ " (1): Conv2dNormActivation(\n",
860
+ " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=512, bias=False)\n",
861
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
862
+ " (2): SiLU(inplace=True)\n",
863
+ " )\n",
864
+ " (2): SqueezeExcitation(\n",
865
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
866
+ " (fc1): Conv2d(512, 32, kernel_size=(1, 1), stride=(1, 1))\n",
867
+ " (fc2): Conv2d(32, 512, kernel_size=(1, 1), stride=(1, 1))\n",
868
+ " (activation): SiLU(inplace=True)\n",
869
+ " (scale_activation): Sigmoid()\n",
870
+ " )\n",
871
+ " (3): Conv2dNormActivation(\n",
872
+ " (0): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
873
+ " (1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
874
+ " )\n",
875
+ " )\n",
876
+ " (stochastic_depth): StochasticDepth(p=0.065, mode=row)\n",
877
+ " )\n",
878
+ " (4): MBConv(\n",
879
+ " (block): Sequential(\n",
880
+ " (0): Conv2dNormActivation(\n",
881
+ " (0): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
882
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
883
+ " (2): SiLU(inplace=True)\n",
884
+ " )\n",
885
+ " (1): Conv2dNormActivation(\n",
886
+ " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=512, bias=False)\n",
887
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
888
+ " (2): SiLU(inplace=True)\n",
889
+ " )\n",
890
+ " (2): SqueezeExcitation(\n",
891
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
892
+ " (fc1): Conv2d(512, 32, kernel_size=(1, 1), stride=(1, 1))\n",
893
+ " (fc2): Conv2d(32, 512, kernel_size=(1, 1), stride=(1, 1))\n",
894
+ " (activation): SiLU(inplace=True)\n",
895
+ " (scale_activation): Sigmoid()\n",
896
+ " )\n",
897
+ " (3): Conv2dNormActivation(\n",
898
+ " (0): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
899
+ " (1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
900
+ " )\n",
901
+ " )\n",
902
+ " (stochastic_depth): StochasticDepth(p=0.07, mode=row)\n",
903
+ " )\n",
904
+ " (5): MBConv(\n",
905
+ " (block): Sequential(\n",
906
+ " (0): Conv2dNormActivation(\n",
907
+ " (0): Conv2d(128, 512, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
908
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
909
+ " (2): SiLU(inplace=True)\n",
910
+ " )\n",
911
+ " (1): Conv2dNormActivation(\n",
912
+ " (0): Conv2d(512, 512, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=512, bias=False)\n",
913
+ " (1): BatchNorm2d(512, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
914
+ " (2): SiLU(inplace=True)\n",
915
+ " )\n",
916
+ " (2): SqueezeExcitation(\n",
917
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
918
+ " (fc1): Conv2d(512, 32, kernel_size=(1, 1), stride=(1, 1))\n",
919
+ " (fc2): Conv2d(32, 512, kernel_size=(1, 1), stride=(1, 1))\n",
920
+ " (activation): SiLU(inplace=True)\n",
921
+ " (scale_activation): Sigmoid()\n",
922
+ " )\n",
923
+ " (3): Conv2dNormActivation(\n",
924
+ " (0): Conv2d(512, 128, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
925
+ " (1): BatchNorm2d(128, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
926
+ " )\n",
927
+ " )\n",
928
+ " (stochastic_depth): StochasticDepth(p=0.075, mode=row)\n",
929
+ " )\n",
930
+ " )\n",
931
+ " (5): Sequential(\n",
932
+ " (0): MBConv(\n",
933
+ " (block): Sequential(\n",
934
+ " (0): Conv2dNormActivation(\n",
935
+ " (0): Conv2d(128, 768, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
936
+ " (1): BatchNorm2d(768, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
937
+ " (2): SiLU(inplace=True)\n",
938
+ " )\n",
939
+ " (1): Conv2dNormActivation(\n",
940
+ " (0): Conv2d(768, 768, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=768, bias=False)\n",
941
+ " (1): BatchNorm2d(768, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
942
+ " (2): SiLU(inplace=True)\n",
943
+ " )\n",
944
+ " (2): SqueezeExcitation(\n",
945
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
946
+ " (fc1): Conv2d(768, 32, kernel_size=(1, 1), stride=(1, 1))\n",
947
+ " (fc2): Conv2d(32, 768, kernel_size=(1, 1), stride=(1, 1))\n",
948
+ " (activation): SiLU(inplace=True)\n",
949
+ " (scale_activation): Sigmoid()\n",
950
+ " )\n",
951
+ " (3): Conv2dNormActivation(\n",
952
+ " (0): Conv2d(768, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
953
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
954
+ " )\n",
955
+ " )\n",
956
+ " (stochastic_depth): StochasticDepth(p=0.08, mode=row)\n",
957
+ " )\n",
958
+ " (1): MBConv(\n",
959
+ " (block): Sequential(\n",
960
+ " (0): Conv2dNormActivation(\n",
961
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
962
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
963
+ " (2): SiLU(inplace=True)\n",
964
+ " )\n",
965
+ " (1): Conv2dNormActivation(\n",
966
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=960, bias=False)\n",
967
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
968
+ " (2): SiLU(inplace=True)\n",
969
+ " )\n",
970
+ " (2): SqueezeExcitation(\n",
971
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
972
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
973
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
974
+ " (activation): SiLU(inplace=True)\n",
975
+ " (scale_activation): Sigmoid()\n",
976
+ " )\n",
977
+ " (3): Conv2dNormActivation(\n",
978
+ " (0): Conv2d(960, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
979
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
980
+ " )\n",
981
+ " )\n",
982
+ " (stochastic_depth): StochasticDepth(p=0.085, mode=row)\n",
983
+ " )\n",
984
+ " (2): MBConv(\n",
985
+ " (block): Sequential(\n",
986
+ " (0): Conv2dNormActivation(\n",
987
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
988
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
989
+ " (2): SiLU(inplace=True)\n",
990
+ " )\n",
991
+ " (1): Conv2dNormActivation(\n",
992
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=960, bias=False)\n",
993
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
994
+ " (2): SiLU(inplace=True)\n",
995
+ " )\n",
996
+ " (2): SqueezeExcitation(\n",
997
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
998
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
999
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
1000
+ " (activation): SiLU(inplace=True)\n",
1001
+ " (scale_activation): Sigmoid()\n",
1002
+ " )\n",
1003
+ " (3): Conv2dNormActivation(\n",
1004
+ " (0): Conv2d(960, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1005
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1006
+ " )\n",
1007
+ " )\n",
1008
+ " (stochastic_depth): StochasticDepth(p=0.09, mode=row)\n",
1009
+ " )\n",
1010
+ " (3): MBConv(\n",
1011
+ " (block): Sequential(\n",
1012
+ " (0): Conv2dNormActivation(\n",
1013
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1014
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1015
+ " (2): SiLU(inplace=True)\n",
1016
+ " )\n",
1017
+ " (1): Conv2dNormActivation(\n",
1018
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=960, bias=False)\n",
1019
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1020
+ " (2): SiLU(inplace=True)\n",
1021
+ " )\n",
1022
+ " (2): SqueezeExcitation(\n",
1023
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1024
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
1025
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
1026
+ " (activation): SiLU(inplace=True)\n",
1027
+ " (scale_activation): Sigmoid()\n",
1028
+ " )\n",
1029
+ " (3): Conv2dNormActivation(\n",
1030
+ " (0): Conv2d(960, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1031
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1032
+ " )\n",
1033
+ " )\n",
1034
+ " (stochastic_depth): StochasticDepth(p=0.095, mode=row)\n",
1035
+ " )\n",
1036
+ " (4): MBConv(\n",
1037
+ " (block): Sequential(\n",
1038
+ " (0): Conv2dNormActivation(\n",
1039
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1040
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1041
+ " (2): SiLU(inplace=True)\n",
1042
+ " )\n",
1043
+ " (1): Conv2dNormActivation(\n",
1044
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=960, bias=False)\n",
1045
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1046
+ " (2): SiLU(inplace=True)\n",
1047
+ " )\n",
1048
+ " (2): SqueezeExcitation(\n",
1049
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1050
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
1051
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
1052
+ " (activation): SiLU(inplace=True)\n",
1053
+ " (scale_activation): Sigmoid()\n",
1054
+ " )\n",
1055
+ " (3): Conv2dNormActivation(\n",
1056
+ " (0): Conv2d(960, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1057
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1058
+ " )\n",
1059
+ " )\n",
1060
+ " (stochastic_depth): StochasticDepth(p=0.1, mode=row)\n",
1061
+ " )\n",
1062
+ " (5): MBConv(\n",
1063
+ " (block): Sequential(\n",
1064
+ " (0): Conv2dNormActivation(\n",
1065
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1066
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1067
+ " (2): SiLU(inplace=True)\n",
1068
+ " )\n",
1069
+ " (1): Conv2dNormActivation(\n",
1070
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=960, bias=False)\n",
1071
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1072
+ " (2): SiLU(inplace=True)\n",
1073
+ " )\n",
1074
+ " (2): SqueezeExcitation(\n",
1075
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1076
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
1077
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
1078
+ " (activation): SiLU(inplace=True)\n",
1079
+ " (scale_activation): Sigmoid()\n",
1080
+ " )\n",
1081
+ " (3): Conv2dNormActivation(\n",
1082
+ " (0): Conv2d(960, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1083
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1084
+ " )\n",
1085
+ " )\n",
1086
+ " (stochastic_depth): StochasticDepth(p=0.10500000000000001, mode=row)\n",
1087
+ " )\n",
1088
+ " (6): MBConv(\n",
1089
+ " (block): Sequential(\n",
1090
+ " (0): Conv2dNormActivation(\n",
1091
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1092
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1093
+ " (2): SiLU(inplace=True)\n",
1094
+ " )\n",
1095
+ " (1): Conv2dNormActivation(\n",
1096
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=960, bias=False)\n",
1097
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1098
+ " (2): SiLU(inplace=True)\n",
1099
+ " )\n",
1100
+ " (2): SqueezeExcitation(\n",
1101
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1102
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
1103
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
1104
+ " (activation): SiLU(inplace=True)\n",
1105
+ " (scale_activation): Sigmoid()\n",
1106
+ " )\n",
1107
+ " (3): Conv2dNormActivation(\n",
1108
+ " (0): Conv2d(960, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1109
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1110
+ " )\n",
1111
+ " )\n",
1112
+ " (stochastic_depth): StochasticDepth(p=0.11000000000000001, mode=row)\n",
1113
+ " )\n",
1114
+ " (7): MBConv(\n",
1115
+ " (block): Sequential(\n",
1116
+ " (0): Conv2dNormActivation(\n",
1117
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1118
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1119
+ " (2): SiLU(inplace=True)\n",
1120
+ " )\n",
1121
+ " (1): Conv2dNormActivation(\n",
1122
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=960, bias=False)\n",
1123
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1124
+ " (2): SiLU(inplace=True)\n",
1125
+ " )\n",
1126
+ " (2): SqueezeExcitation(\n",
1127
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1128
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
1129
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
1130
+ " (activation): SiLU(inplace=True)\n",
1131
+ " (scale_activation): Sigmoid()\n",
1132
+ " )\n",
1133
+ " (3): Conv2dNormActivation(\n",
1134
+ " (0): Conv2d(960, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1135
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1136
+ " )\n",
1137
+ " )\n",
1138
+ " (stochastic_depth): StochasticDepth(p=0.11500000000000002, mode=row)\n",
1139
+ " )\n",
1140
+ " (8): MBConv(\n",
1141
+ " (block): Sequential(\n",
1142
+ " (0): Conv2dNormActivation(\n",
1143
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1144
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1145
+ " (2): SiLU(inplace=True)\n",
1146
+ " )\n",
1147
+ " (1): Conv2dNormActivation(\n",
1148
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=960, bias=False)\n",
1149
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1150
+ " (2): SiLU(inplace=True)\n",
1151
+ " )\n",
1152
+ " (2): SqueezeExcitation(\n",
1153
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1154
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
1155
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
1156
+ " (activation): SiLU(inplace=True)\n",
1157
+ " (scale_activation): Sigmoid()\n",
1158
+ " )\n",
1159
+ " (3): Conv2dNormActivation(\n",
1160
+ " (0): Conv2d(960, 160, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1161
+ " (1): BatchNorm2d(160, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1162
+ " )\n",
1163
+ " )\n",
1164
+ " (stochastic_depth): StochasticDepth(p=0.12000000000000002, mode=row)\n",
1165
+ " )\n",
1166
+ " )\n",
1167
+ " (6): Sequential(\n",
1168
+ " (0): MBConv(\n",
1169
+ " (block): Sequential(\n",
1170
+ " (0): Conv2dNormActivation(\n",
1171
+ " (0): Conv2d(160, 960, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1172
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1173
+ " (2): SiLU(inplace=True)\n",
1174
+ " )\n",
1175
+ " (1): Conv2dNormActivation(\n",
1176
+ " (0): Conv2d(960, 960, kernel_size=(3, 3), stride=(2, 2), padding=(1, 1), groups=960, bias=False)\n",
1177
+ " (1): BatchNorm2d(960, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1178
+ " (2): SiLU(inplace=True)\n",
1179
+ " )\n",
1180
+ " (2): SqueezeExcitation(\n",
1181
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1182
+ " (fc1): Conv2d(960, 40, kernel_size=(1, 1), stride=(1, 1))\n",
1183
+ " (fc2): Conv2d(40, 960, kernel_size=(1, 1), stride=(1, 1))\n",
1184
+ " (activation): SiLU(inplace=True)\n",
1185
+ " (scale_activation): Sigmoid()\n",
1186
+ " )\n",
1187
+ " (3): Conv2dNormActivation(\n",
1188
+ " (0): Conv2d(960, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1189
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1190
+ " )\n",
1191
+ " )\n",
1192
+ " (stochastic_depth): StochasticDepth(p=0.125, mode=row)\n",
1193
+ " )\n",
1194
+ " (1): MBConv(\n",
1195
+ " (block): Sequential(\n",
1196
+ " (0): Conv2dNormActivation(\n",
1197
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1198
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1199
+ " (2): SiLU(inplace=True)\n",
1200
+ " )\n",
1201
+ " (1): Conv2dNormActivation(\n",
1202
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1203
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1204
+ " (2): SiLU(inplace=True)\n",
1205
+ " )\n",
1206
+ " (2): SqueezeExcitation(\n",
1207
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1208
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1209
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1210
+ " (activation): SiLU(inplace=True)\n",
1211
+ " (scale_activation): Sigmoid()\n",
1212
+ " )\n",
1213
+ " (3): Conv2dNormActivation(\n",
1214
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1215
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1216
+ " )\n",
1217
+ " )\n",
1218
+ " (stochastic_depth): StochasticDepth(p=0.13, mode=row)\n",
1219
+ " )\n",
1220
+ " (2): MBConv(\n",
1221
+ " (block): Sequential(\n",
1222
+ " (0): Conv2dNormActivation(\n",
1223
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1224
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1225
+ " (2): SiLU(inplace=True)\n",
1226
+ " )\n",
1227
+ " (1): Conv2dNormActivation(\n",
1228
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1229
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1230
+ " (2): SiLU(inplace=True)\n",
1231
+ " )\n",
1232
+ " (2): SqueezeExcitation(\n",
1233
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1234
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1235
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1236
+ " (activation): SiLU(inplace=True)\n",
1237
+ " (scale_activation): Sigmoid()\n",
1238
+ " )\n",
1239
+ " (3): Conv2dNormActivation(\n",
1240
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1241
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1242
+ " )\n",
1243
+ " )\n",
1244
+ " (stochastic_depth): StochasticDepth(p=0.135, mode=row)\n",
1245
+ " )\n",
1246
+ " (3): MBConv(\n",
1247
+ " (block): Sequential(\n",
1248
+ " (0): Conv2dNormActivation(\n",
1249
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1250
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1251
+ " (2): SiLU(inplace=True)\n",
1252
+ " )\n",
1253
+ " (1): Conv2dNormActivation(\n",
1254
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1255
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1256
+ " (2): SiLU(inplace=True)\n",
1257
+ " )\n",
1258
+ " (2): SqueezeExcitation(\n",
1259
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1260
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1261
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1262
+ " (activation): SiLU(inplace=True)\n",
1263
+ " (scale_activation): Sigmoid()\n",
1264
+ " )\n",
1265
+ " (3): Conv2dNormActivation(\n",
1266
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1267
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1268
+ " )\n",
1269
+ " )\n",
1270
+ " (stochastic_depth): StochasticDepth(p=0.14, mode=row)\n",
1271
+ " )\n",
1272
+ " (4): MBConv(\n",
1273
+ " (block): Sequential(\n",
1274
+ " (0): Conv2dNormActivation(\n",
1275
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1276
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1277
+ " (2): SiLU(inplace=True)\n",
1278
+ " )\n",
1279
+ " (1): Conv2dNormActivation(\n",
1280
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1281
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1282
+ " (2): SiLU(inplace=True)\n",
1283
+ " )\n",
1284
+ " (2): SqueezeExcitation(\n",
1285
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1286
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1287
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1288
+ " (activation): SiLU(inplace=True)\n",
1289
+ " (scale_activation): Sigmoid()\n",
1290
+ " )\n",
1291
+ " (3): Conv2dNormActivation(\n",
1292
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1293
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1294
+ " )\n",
1295
+ " )\n",
1296
+ " (stochastic_depth): StochasticDepth(p=0.14500000000000002, mode=row)\n",
1297
+ " )\n",
1298
+ " (5): MBConv(\n",
1299
+ " (block): Sequential(\n",
1300
+ " (0): Conv2dNormActivation(\n",
1301
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1302
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1303
+ " (2): SiLU(inplace=True)\n",
1304
+ " )\n",
1305
+ " (1): Conv2dNormActivation(\n",
1306
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1307
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1308
+ " (2): SiLU(inplace=True)\n",
1309
+ " )\n",
1310
+ " (2): SqueezeExcitation(\n",
1311
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1312
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1313
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1314
+ " (activation): SiLU(inplace=True)\n",
1315
+ " (scale_activation): Sigmoid()\n",
1316
+ " )\n",
1317
+ " (3): Conv2dNormActivation(\n",
1318
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1319
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1320
+ " )\n",
1321
+ " )\n",
1322
+ " (stochastic_depth): StochasticDepth(p=0.15, mode=row)\n",
1323
+ " )\n",
1324
+ " (6): MBConv(\n",
1325
+ " (block): Sequential(\n",
1326
+ " (0): Conv2dNormActivation(\n",
1327
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1328
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1329
+ " (2): SiLU(inplace=True)\n",
1330
+ " )\n",
1331
+ " (1): Conv2dNormActivation(\n",
1332
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1333
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1334
+ " (2): SiLU(inplace=True)\n",
1335
+ " )\n",
1336
+ " (2): SqueezeExcitation(\n",
1337
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1338
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1339
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1340
+ " (activation): SiLU(inplace=True)\n",
1341
+ " (scale_activation): Sigmoid()\n",
1342
+ " )\n",
1343
+ " (3): Conv2dNormActivation(\n",
1344
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1345
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1346
+ " )\n",
1347
+ " )\n",
1348
+ " (stochastic_depth): StochasticDepth(p=0.155, mode=row)\n",
1349
+ " )\n",
1350
+ " (7): MBConv(\n",
1351
+ " (block): Sequential(\n",
1352
+ " (0): Conv2dNormActivation(\n",
1353
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1354
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1355
+ " (2): SiLU(inplace=True)\n",
1356
+ " )\n",
1357
+ " (1): Conv2dNormActivation(\n",
1358
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1359
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1360
+ " (2): SiLU(inplace=True)\n",
1361
+ " )\n",
1362
+ " (2): SqueezeExcitation(\n",
1363
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1364
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1365
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1366
+ " (activation): SiLU(inplace=True)\n",
1367
+ " (scale_activation): Sigmoid()\n",
1368
+ " )\n",
1369
+ " (3): Conv2dNormActivation(\n",
1370
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1371
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1372
+ " )\n",
1373
+ " )\n",
1374
+ " (stochastic_depth): StochasticDepth(p=0.16, mode=row)\n",
1375
+ " )\n",
1376
+ " (8): MBConv(\n",
1377
+ " (block): Sequential(\n",
1378
+ " (0): Conv2dNormActivation(\n",
1379
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1380
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1381
+ " (2): SiLU(inplace=True)\n",
1382
+ " )\n",
1383
+ " (1): Conv2dNormActivation(\n",
1384
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1385
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1386
+ " (2): SiLU(inplace=True)\n",
1387
+ " )\n",
1388
+ " (2): SqueezeExcitation(\n",
1389
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1390
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1391
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1392
+ " (activation): SiLU(inplace=True)\n",
1393
+ " (scale_activation): Sigmoid()\n",
1394
+ " )\n",
1395
+ " (3): Conv2dNormActivation(\n",
1396
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1397
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1398
+ " )\n",
1399
+ " )\n",
1400
+ " (stochastic_depth): StochasticDepth(p=0.165, mode=row)\n",
1401
+ " )\n",
1402
+ " (9): MBConv(\n",
1403
+ " (block): Sequential(\n",
1404
+ " (0): Conv2dNormActivation(\n",
1405
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1406
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1407
+ " (2): SiLU(inplace=True)\n",
1408
+ " )\n",
1409
+ " (1): Conv2dNormActivation(\n",
1410
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1411
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1412
+ " (2): SiLU(inplace=True)\n",
1413
+ " )\n",
1414
+ " (2): SqueezeExcitation(\n",
1415
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1416
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1417
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1418
+ " (activation): SiLU(inplace=True)\n",
1419
+ " (scale_activation): Sigmoid()\n",
1420
+ " )\n",
1421
+ " (3): Conv2dNormActivation(\n",
1422
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1423
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1424
+ " )\n",
1425
+ " )\n",
1426
+ " (stochastic_depth): StochasticDepth(p=0.17, mode=row)\n",
1427
+ " )\n",
1428
+ " (10): MBConv(\n",
1429
+ " (block): Sequential(\n",
1430
+ " (0): Conv2dNormActivation(\n",
1431
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1432
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1433
+ " (2): SiLU(inplace=True)\n",
1434
+ " )\n",
1435
+ " (1): Conv2dNormActivation(\n",
1436
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1437
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1438
+ " (2): SiLU(inplace=True)\n",
1439
+ " )\n",
1440
+ " (2): SqueezeExcitation(\n",
1441
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1442
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1443
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1444
+ " (activation): SiLU(inplace=True)\n",
1445
+ " (scale_activation): Sigmoid()\n",
1446
+ " )\n",
1447
+ " (3): Conv2dNormActivation(\n",
1448
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1449
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1450
+ " )\n",
1451
+ " )\n",
1452
+ " (stochastic_depth): StochasticDepth(p=0.175, mode=row)\n",
1453
+ " )\n",
1454
+ " (11): MBConv(\n",
1455
+ " (block): Sequential(\n",
1456
+ " (0): Conv2dNormActivation(\n",
1457
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1458
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1459
+ " (2): SiLU(inplace=True)\n",
1460
+ " )\n",
1461
+ " (1): Conv2dNormActivation(\n",
1462
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1463
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1464
+ " (2): SiLU(inplace=True)\n",
1465
+ " )\n",
1466
+ " (2): SqueezeExcitation(\n",
1467
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1468
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1469
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1470
+ " (activation): SiLU(inplace=True)\n",
1471
+ " (scale_activation): Sigmoid()\n",
1472
+ " )\n",
1473
+ " (3): Conv2dNormActivation(\n",
1474
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1475
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1476
+ " )\n",
1477
+ " )\n",
1478
+ " (stochastic_depth): StochasticDepth(p=0.18, mode=row)\n",
1479
+ " )\n",
1480
+ " (12): MBConv(\n",
1481
+ " (block): Sequential(\n",
1482
+ " (0): Conv2dNormActivation(\n",
1483
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1484
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1485
+ " (2): SiLU(inplace=True)\n",
1486
+ " )\n",
1487
+ " (1): Conv2dNormActivation(\n",
1488
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1489
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1490
+ " (2): SiLU(inplace=True)\n",
1491
+ " )\n",
1492
+ " (2): SqueezeExcitation(\n",
1493
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1494
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1495
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1496
+ " (activation): SiLU(inplace=True)\n",
1497
+ " (scale_activation): Sigmoid()\n",
1498
+ " )\n",
1499
+ " (3): Conv2dNormActivation(\n",
1500
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1501
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1502
+ " )\n",
1503
+ " )\n",
1504
+ " (stochastic_depth): StochasticDepth(p=0.185, mode=row)\n",
1505
+ " )\n",
1506
+ " (13): MBConv(\n",
1507
+ " (block): Sequential(\n",
1508
+ " (0): Conv2dNormActivation(\n",
1509
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1510
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1511
+ " (2): SiLU(inplace=True)\n",
1512
+ " )\n",
1513
+ " (1): Conv2dNormActivation(\n",
1514
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1515
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1516
+ " (2): SiLU(inplace=True)\n",
1517
+ " )\n",
1518
+ " (2): SqueezeExcitation(\n",
1519
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1520
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1521
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1522
+ " (activation): SiLU(inplace=True)\n",
1523
+ " (scale_activation): Sigmoid()\n",
1524
+ " )\n",
1525
+ " (3): Conv2dNormActivation(\n",
1526
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1527
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1528
+ " )\n",
1529
+ " )\n",
1530
+ " (stochastic_depth): StochasticDepth(p=0.19, mode=row)\n",
1531
+ " )\n",
1532
+ " (14): MBConv(\n",
1533
+ " (block): Sequential(\n",
1534
+ " (0): Conv2dNormActivation(\n",
1535
+ " (0): Conv2d(256, 1536, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1536
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1537
+ " (2): SiLU(inplace=True)\n",
1538
+ " )\n",
1539
+ " (1): Conv2dNormActivation(\n",
1540
+ " (0): Conv2d(1536, 1536, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=1536, bias=False)\n",
1541
+ " (1): BatchNorm2d(1536, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1542
+ " (2): SiLU(inplace=True)\n",
1543
+ " )\n",
1544
+ " (2): SqueezeExcitation(\n",
1545
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1546
+ " (fc1): Conv2d(1536, 64, kernel_size=(1, 1), stride=(1, 1))\n",
1547
+ " (fc2): Conv2d(64, 1536, kernel_size=(1, 1), stride=(1, 1))\n",
1548
+ " (activation): SiLU(inplace=True)\n",
1549
+ " (scale_activation): Sigmoid()\n",
1550
+ " )\n",
1551
+ " (3): Conv2dNormActivation(\n",
1552
+ " (0): Conv2d(1536, 256, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1553
+ " (1): BatchNorm2d(256, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1554
+ " )\n",
1555
+ " )\n",
1556
+ " (stochastic_depth): StochasticDepth(p=0.195, mode=row)\n",
1557
+ " )\n",
1558
+ " )\n",
1559
+ " (7): Conv2dNormActivation(\n",
1560
+ " (0): Conv2d(256, 1280, kernel_size=(1, 1), stride=(1, 1), bias=False)\n",
1561
+ " (1): BatchNorm2d(1280, eps=0.001, momentum=0.1, affine=True, track_running_stats=True)\n",
1562
+ " (2): SiLU(inplace=True)\n",
1563
+ " )\n",
1564
+ " )\n",
1565
+ " (avgpool): AdaptiveAvgPool2d(output_size=1)\n",
1566
+ " (classifier): Sequential(\n",
1567
+ " (0): Dropout(p=0.2, inplace=True)\n",
1568
+ " (1): Linear(in_features=1280, out_features=2, bias=True)\n",
1569
+ " )\n",
1570
+ " )\n",
1571
+ ")"
1572
+ ]
1573
+ },
1574
+ "metadata": {},
1575
+ "execution_count": 5
1576
+ }
1577
+ ]
1578
+ }
1579
+ ]
1580
+ }