Views
No views yet
nn.Sequential):Conv2d: 13 input channels, 128 output channels, kernel size 4, padding 1.ReLU activation.MaxPool2d: kernel size 2.Conv2d: 128 input channels, 64 output channels, kernel size 4, padding 1.ReLU activation.MaxPool2d: kernel size 2.Conv2d: 64 input channels, 32 output channels, kernel size 4, padding 1.ReLU activation.MaxPool2d: kernel size 2.Conv2d: 32 input channels, 16 output channels, kernel size 4, padding 1.ReLU activation.MaxPool2d: kernel size 2.nn.Sequential):Flatten layer.Linear layer: dynamically calculated input features to 64 output features.ReLU activation.Linear layer: 64 input features to num_classes (output classes).1import torch
2import torch.nn as nn
3
4from model_def import EuroSATCNN
5
6
7# Example usage:
8# Assuming num_classes is known, e.g., 10 for EuroSAT
9# model = EuroSATCNN(num_classes=10)
10# model.load_state_dict(torch.load("pytorch_model.bin"))
11# dummy_input_image = torch.randn(1, 13, 64, 64) # Batch size 1, 13 channels, 64x64
12# output = model(dummy_input_image)
13# print(output.shape) # Should be torch.Size([1, 10]) if num_classes=20
14
15
16---
17## About the Author
18
19This model was developed by **Robin Hamers**.
20
21* **LinkedIn:** <https://www.linkedin.com/in/robin-hamers/>