joonmyung 1.5.10__tar.gz → 1.5.11__tar.gz
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.
- {joonmyung-1.5.10 → joonmyung-1.5.11}/PKG-INFO +1 -1
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/analysis/analysis.py +14 -13
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/script.py +2 -2
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung.egg-info/PKG-INFO +1 -1
- {joonmyung-1.5.10 → joonmyung-1.5.11}/setup.py +1 -1
- {joonmyung-1.5.10 → joonmyung-1.5.11}/LICENSE.txt +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/README.md +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/__init__.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/analysis/__init__.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/analysis/dataset.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/analysis/hook.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/analysis/metric.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/analysis/model.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/analysis/utils.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/app.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/data.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/draw.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/dummy.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/file.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/gradcam.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/log.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/meta_data/__init__.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/meta_data/label.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/meta_data/utils.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/metric.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/models/__init__.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/models/tome.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/status.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung/utils.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung.egg-info/SOURCES.txt +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung.egg-info/dependency_links.txt +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung.egg-info/not-zip-safe +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/joonmyung.egg-info/top_level.txt +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/SA/MHSA.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/SA/PVTSA.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/SA/TMSA.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/SA/__init__.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/__init__.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/deit.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/evit.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/modules/PE.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/modules/__init__.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/modules/blocks.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/pvt.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/pvt_v2.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/models/tome.py +0 -0
- {joonmyung-1.5.10 → joonmyung-1.5.11}/setup.cfg +0 -0
|
@@ -67,8 +67,7 @@ class Analysis:
|
|
|
67
67
|
{"name_i": 'qkv', "name_o": 'decoder', "fn_f": self.qkv_forward, "fn_b": self.qkv_backward},
|
|
68
68
|
{"name_i": 'head', "name_o": 'decoder', "fn_f": self.head_forward, "fn_b": self.head_backward},
|
|
69
69
|
{"name_i": 'patch_embed.norm', "name_o": 'decoder', "fn_f": self.input_forward, "fn_b": self.input_backward}]
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
self.activate = activate
|
|
72
71
|
|
|
73
72
|
self.amp_autocast = amp_autocast
|
|
74
73
|
self.device = device
|
|
@@ -82,15 +81,15 @@ class Analysis:
|
|
|
82
81
|
|
|
83
82
|
def attn_forward(self, module, input, output):
|
|
84
83
|
# input/output : 1 * (8, 3, 197, 197) / (8, 3, 197, 197)
|
|
85
|
-
self.info["attn"]["f"] = output.detach() if self.detach else output
|
|
84
|
+
if self.activate[0]: self.info["attn"]["f"] = output.detach() if self.detach else output
|
|
86
85
|
|
|
87
86
|
def attn_backward(self, module, grad_input, grad_output):
|
|
88
87
|
# input/output : 1 * (8, 3, 197, 192) / (8, 3, 197, 576)
|
|
89
|
-
self.info["attn"]["b"] = grad_input[0].detach() if self.detach else grad_input[0]
|
|
88
|
+
if self.activate[0]: self.info["attn"]["b"] = grad_input[0].detach() if self.detach else grad_input[0]
|
|
90
89
|
|
|
91
90
|
def qkv_forward(self, module, input, output):
|
|
92
91
|
# input/output : 1 * (8, 197, 192) / (8, 197, 576)
|
|
93
|
-
self.info["qkv"]["f"].append(output.detach())
|
|
92
|
+
if self.activate[1]: self.info["qkv"]["f"].append(output.detach())
|
|
94
93
|
|
|
95
94
|
def qkv_backward(self, module, grad_input, grad_output):
|
|
96
95
|
# self.info["qkv"]["b"].append(grad_input[0].detach())
|
|
@@ -98,20 +97,22 @@ class Analysis:
|
|
|
98
97
|
|
|
99
98
|
def head_forward(self, module, input, output):
|
|
100
99
|
# input : 1 * (8(B), 192(D)), output : (8(B), 1000(C))
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
100
|
+
if self.activate[2]:
|
|
101
|
+
B = output.shape[0]
|
|
102
|
+
pred = targetPred(output, self.targets, topk=5)
|
|
103
|
+
self.info["head"]["TF"] += (pred[:, 0] == pred[:, 1])
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
105
|
+
acc1, acc5 = accuracy(output, self.targets, topk=(1,5))
|
|
106
|
+
self.info["head"]["acc1"].update(acc1.item(), n=B)
|
|
107
|
+
self.info["head"]["acc5"].update(acc5.item(), n=B)
|
|
108
108
|
|
|
109
109
|
def head_backward(self, module, grad_input, grad_output):
|
|
110
110
|
pass
|
|
111
111
|
|
|
112
112
|
def input_forward(self, module, input, output):
|
|
113
|
-
|
|
114
|
-
|
|
113
|
+
if self.activate[3]:
|
|
114
|
+
norm = F.normalize(output, dim=-1)
|
|
115
|
+
self.info["input"]["sim"] += (norm @ norm.transpose(-1, -2)).mean(dim=(-1, -2))
|
|
115
116
|
|
|
116
117
|
def input_backward(self, module, grad_input, grad_output):
|
|
117
118
|
pass
|
|
@@ -97,7 +97,7 @@ class GPU_Worker():
|
|
|
97
97
|
return
|
|
98
98
|
|
|
99
99
|
def message(self, text):
|
|
100
|
-
url = "https://hooks.slack.com/services/TK76B38LV/
|
|
100
|
+
url = "https://hooks.slack.com/services/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"
|
|
101
101
|
payload = {"text": text}
|
|
102
102
|
headers = {'Content-type': 'application/json'}
|
|
103
103
|
|
|
@@ -123,7 +123,7 @@ def Process_Worker(processes, gpuWorker, id = "", p = True):
|
|
|
123
123
|
training_time = datetime.timedelta(seconds=time.mktime(end) - time.mktime(start))
|
|
124
124
|
print(f"Time 1/all : {training_time}/{training_time / len(processes)} ------")
|
|
125
125
|
gpuWorker.message(f"Experiments Finished"
|
|
126
|
-
f"{id} : "
|
|
126
|
+
f"{id} : {server}"
|
|
127
127
|
f"Time 1/all : {training_time}/{training_time / len(processes)}"
|
|
128
128
|
)
|
|
129
129
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|