Spaces:
Runtime error
Runtime error
config/args added
Browse files- config/args.py +23 -0
config/args.py
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from dataclasses import dataclass
|
2 |
+
|
3 |
+
|
4 |
+
@dataclass
|
5 |
+
class Args:
|
6 |
+
"""
|
7 |
+
Training arguments.
|
8 |
+
"""
|
9 |
+
|
10 |
+
# Learning rate for the optimizer
|
11 |
+
learning_rate: float = 1e-3
|
12 |
+
# Training batch size
|
13 |
+
batch_size: int = 64
|
14 |
+
# Total numebr of classes
|
15 |
+
num_classes: int = 10
|
16 |
+
# Maximum number of training epochs
|
17 |
+
max_epochs: int = 100
|
18 |
+
# Input shape
|
19 |
+
input_shape: tuple = (3, 224, 224)
|
20 |
+
# Use pretrained weights
|
21 |
+
# Can be "IMAGENET1K_V1", "IMAGENET1K_V2", "DEFAULT"
|
22 |
+
# CHec more at https://pytorch.org/vision/stable/models.html
|
23 |
+
weights: str = None
|