AravindKumarRajendran commited on
Commit
17b870c
·
1 Parent(s): cbb31e2

fix issues

Browse files
Files changed (3) hide show
  1. README.md +0 -5
  2. src/__init__.py +0 -0
  3. src/config.py +28 -0
README.md CHANGED
@@ -174,8 +174,3 @@ numpy>=1.21.0
174
  python app.py
175
  ```
176
 
177
- ## Support
178
-
179
- - GitHub Issues: [Repository URL]
180
- - Hugging Face Forum: [Forum URL]
181
- - Documentation: [Docs URL]
 
174
  python app.py
175
  ```
176
 
 
 
 
 
 
src/__init__.py ADDED
File without changes
src/config.py ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+
3
+ class Params:
4
+ def __init__(self):
5
+ self.batch_size = 148
6
+ self.name = "resnet_50"
7
+ self.num_workers = 48
8
+ self.lr = 0.165
9
+ self.momentum = 0.9
10
+ self.weight_decay = 1e-4
11
+ self.lr_step_size = 30
12
+ self.lr_gamma = 0.1
13
+ self.num_epochs = 50
14
+
15
+ def __repr__(self):
16
+ return str(self.__dict__)
17
+
18
+ def __eq__(self, other):
19
+ return self.__dict__ == other.__dict__
20
+
21
+ def get_device():
22
+ return (
23
+ "cuda"
24
+ if torch.cuda.is_available()
25
+ else "mps"
26
+ if torch.backends.mps.is_available()
27
+ else "cpu"
28
+ )