shancx 1.9.33.230__py3-none-any.whl → 1.9.33.232__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- shancx/H/__init__.py +3 -0
- shancx/H/optSchler.py +19 -0
- shancx/H/simple.py +8 -0
- {shancx-1.9.33.230.dist-info → shancx-1.9.33.232.dist-info}/METADATA +1 -1
- {shancx-1.9.33.230.dist-info → shancx-1.9.33.232.dist-info}/RECORD +7 -4
- {shancx-1.9.33.230.dist-info → shancx-1.9.33.232.dist-info}/WHEEL +0 -0
- {shancx-1.9.33.230.dist-info → shancx-1.9.33.232.dist-info}/top_level.txt +0 -0
shancx/H/__init__.py
ADDED
shancx/H/optSchler.py
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import torch.optim as optim
|
|
2
|
+
from torch.optim.lr_scheduler import StepLR, ReduceLROnPlateau
|
|
3
|
+
def getoptSchler(lr=3e-5,gamma=0.85)
|
|
4
|
+
optimizer = optim.AdamW(model.parameters(), lr=lr, weight_decay=1e-4)
|
|
5
|
+
# scheduler = ReduceLROnPlateau(optimizer, mode='min', factor=0.1, patience=5, verbose=True)
|
|
6
|
+
scheduler = StepLR(optimizer, step_size=10, gamma=gamma) #step_size=10,
|
|
7
|
+
return optimizer,scheduler
|
|
8
|
+
"""
|
|
9
|
+
import torch.cuda.amp as amp
|
|
10
|
+
scaler = amp.GradScaler()
|
|
11
|
+
with amp.autocast():
|
|
12
|
+
optimizer.zero_grad()
|
|
13
|
+
scaler.scale(loss).backward()
|
|
14
|
+
scaler.step(optimizer)
|
|
15
|
+
scaler.update()
|
|
16
|
+
current_lr = optimizer.param_groups[0]['lr']
|
|
17
|
+
writer.add_scalar('Learning_Rate/lr', current_lr, epoch)
|
|
18
|
+
scheduler.step() # scheduler.step(val_loss)
|
|
19
|
+
"""
|
shancx/H/simple.py
ADDED
|
@@ -59,6 +59,9 @@ shancx/Fillmiss/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
59
59
|
shancx/Fillmiss/imgidwJU.py,sha256=CyP4ZlhPpXPqGVzzcLR7lohVl8bWjEceJLo7yvKgtEM,1708
|
|
60
60
|
shancx/Fillmiss/imgidwLatLonJU.py,sha256=ltYZj9CwN8cVs4Kow64oVN1EiBERgW9FceTUBFkCOAs,4314
|
|
61
61
|
shancx/Gpu/__init__.py,sha256=4Ahq04phTGVlFWN9Vih0WAh-IqFrhtwM5hj4G1IU2Dk,1950
|
|
62
|
+
shancx/H/__init__.py,sha256=LzGCfmNvFq5nJQV-H5qvlbbN7Yv93Tv5XEAP92t8Hc4,97
|
|
63
|
+
shancx/H/optSchler.py,sha256=vlrditYROuWoKX6XnKCslX4XU-fQEaCXMYF-ZHWEaGQ,793
|
|
64
|
+
shancx/H/simple.py,sha256=mndEspQfaUBkBLbPjw8eejr63l6OINSOMQJXDjgi-u0,223
|
|
62
65
|
shancx/H9/__init__.py,sha256=FCarcXfU2tVD2KrCGKNNUuL51zAWZYHV7lrP7gntvaI,4911
|
|
63
66
|
shancx/H9/ahi_read_hsd.py,sha256=bt9oOOARcXijmyGpmHYXj0NKnuTntZjqx0_tu6Vp2vs,33522
|
|
64
67
|
shancx/H9/ahisearchtable.py,sha256=e2kpz-P5npgL4gzNxn8igERJuWWIysvTNLkptr5_Zcc,9579
|
|
@@ -87,7 +90,7 @@ shancx/Train/multiGpu.py,sha256=D_oZeiSc7VWktpnVDwrFOC1CYZSt9rxOKY5lngE5vFg,820
|
|
|
87
90
|
shancx/Train/prepare.py,sha256=vL_8UOA66oZCBIwCICtihsGibivtNgaVJGulJxfNdn8,6793
|
|
88
91
|
shancx/Train/renet50.py,sha256=wEhYk1X96WE5zuqHqVxWLJa-A5jDNkz4z6edORNufnA,6428
|
|
89
92
|
shancx/tensBoard/__init__.py,sha256=ga2C5YyJITvvQA1ocpxna_KNFnNRJVwkTjLoIglLZUQ,993
|
|
90
|
-
shancx-1.9.33.
|
|
91
|
-
shancx-1.9.33.
|
|
92
|
-
shancx-1.9.33.
|
|
93
|
-
shancx-1.9.33.
|
|
93
|
+
shancx-1.9.33.232.dist-info/METADATA,sha256=9WDsU0Z4dIdV5u5BsKQFCwPWEUb2kmUa-017b7dFyX8,850
|
|
94
|
+
shancx-1.9.33.232.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
95
|
+
shancx-1.9.33.232.dist-info/top_level.txt,sha256=akfCS1vKWz3pNmEN_yN9ZiGp-60IQY5ET38mRx_i_-4,7
|
|
96
|
+
shancx-1.9.33.232.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|