|
# EfficientNet Model |
|
|
|
## Model Class |
|
|
|
```python |
|
model = efficientnet_b0(weights='IMAGENET1K_V1') |
|
|
|
in_features = model.classifier[1].in_features |
|
model.classifier[1] = nn.Linear(in_features, 2) |
|
|
|
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu') |
|
model.to(device) |
|
|
|
criterion = nn.MSELoss() |
|
optimizer = optim.Adam(model.parameters(), lr=1e-4) |
|
``` |
|
|
|
## How to Run |
|
In the notebook Run_EfficientNet.ipynb, replace the line: |
|
```python |
|
dataset_test = load_dataset("gydou/released_img") |
|
``` |
|
with the proper location of the testing dataset. |
|
|
|
## Training Dataset Statistics |
|
```python |
|
lat_std = 0.0006914493505038013 |
|
lon_std = 0.0006539239061573955 |
|
lat_mean = 39.9517411499467 |
|
lon_mean = -75.19143213125122 |
|
``` |