Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EfficientNet Model
|
| 2 |
+
|
| 3 |
+
## Model Class
|
| 4 |
+
|
| 5 |
+
```python
|
| 6 |
+
model = efficientnet_b0(weights='IMAGENET1K_V1')
|
| 7 |
+
|
| 8 |
+
in_features = model.classifier[1].in_features
|
| 9 |
+
model.classifier[1] = nn.Linear(in_features, 2)
|
| 10 |
+
|
| 11 |
+
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
|
| 12 |
+
model.to(device)
|
| 13 |
+
|
| 14 |
+
criterion = nn.MSELoss()
|
| 15 |
+
optimizer = optim.Adam(model.parameters(), lr=1e-4)
|
| 16 |
+
```
|
| 17 |
+
|
| 18 |
+
## How to Run
|
| 19 |
+
In the notebook Run_swin_base.ipynb, replace the line:
|
| 20 |
+
```python
|
| 21 |
+
dataset_test = load_dataset("gydou/released_img")
|
| 22 |
+
```
|
| 23 |
+
with the proper location of the testing dataset.
|
| 24 |
+
|
| 25 |
+
## Training Dataset Statistics
|
| 26 |
+
```python
|
| 27 |
+
lat_std = 0.0006914493505038013
|
| 28 |
+
lon_std = 0.0006539239061573955
|
| 29 |
+
lat_mean = 39.9517411499467
|
| 30 |
+
lon_mean = -75.19143213125122
|
| 31 |
+
```
|