From a7e9a9690e91ee22649990fce3294fb4eb2f091e Mon Sep 17 00:00:00 2001 From: rltq Date: Sun, 12 Apr 2026 07:22:24 +0900 Subject: [PATCH 1/7] =?UTF-8?q?docs:=20pruning=20=EB=88=84=EB=9D=BD=20?= =?UTF-8?q?=EB=B3=B4=EC=99=84=ED=95=98=EC=97=AC=20=EB=B2=88=EC=97=AD=20?= =?UTF-8?q?=EA=B0=9C=EC=84=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit related: PR 927 --- advanced_source/semi_structured_sparse.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/advanced_source/semi_structured_sparse.py b/advanced_source/semi_structured_sparse.py index f7336189..753e831f 100644 --- a/advanced_source/semi_structured_sparse.py +++ b/advanced_source/semi_structured_sparse.py @@ -368,7 +368,6 @@ def measure_execution_time(model, batch_sizes, dataset): return batch_size_to_time_sec - ###################################################################### # 모델과 토크나이저를 로드한 후, 데이터셋을 설정하면서 시작하겠습니다. # @@ -491,7 +490,7 @@ def measure_execution_time(model, batch_sizes, dataset): ###################################################################### -# 모델의 매개변수화는 첫 번째 단계는 모델의 가중치를 마스킹하기 위한 매개변수화를 삽입하는 것입니다. +# 모델의 모델의 가지치기를 위한 첫번째 단계는 모델의 가중치를 마스킹하기 위한 매개변수화를 삽입하는 것입니다. # 이는 준비 단계에서 수행됩니다. 이렇게 하면 ``.weight``에 접근할 때마다 대신 ``mask * weight``를 # 얻게 됩니다. # From b5101fe99522c02b655f3358fde05d8bde45ded6 Mon Sep 17 00:00:00 2001 From: rltq Date: Sun, 12 Apr 2026 07:23:03 +0900 Subject: [PATCH 2/7] =?UTF-8?q?docs:=20=EB=B2=88=EC=97=AD=EC=96=B4=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC=20-=20=EA=B3=84=EC=B8=B5,=20=EB=A7=A4?= =?UTF-8?q?=EA=B0=9C=EB=B3=80=EC=88=98=20(PR=20879)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipes_source/recipes/tuning_guide.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/recipes_source/recipes/tuning_guide.py b/recipes_source/recipes/tuning_guide.py index c2e19a5e..28cbf16d 100644 --- a/recipes_source/recipes/tuning_guide.py +++ b/recipes_source/recipes/tuning_guide.py @@ -142,7 +142,7 @@ def gelu(x): # 효율을 개선할 수 있습니다. # # 체크포인트 저장할 대상은 신중하게 선택해야 합니다. 가장 좋은 방법은 재계산 비용이 적은 대규모 -# 레이어의 출력을 저장하지 않는 것입니다. 예를 들어, 활성화 함수(예시: ``ReLU`` , ``Sigmoid`` +# 계층의 출력을 저장하지 않는 것입니다. 예를 들어, 활성화 함수(예시: ``ReLU`` , ``Sigmoid`` # , ``Tanh`` ), up/down 샘플링, 작은 누적 깊이(accumulation depth)를 가진 행렬-벡터 연산 # 등이 체크포인트 저장 대상으로 적합합니다. # @@ -408,8 +408,8 @@ def gelu(x): # # * `Deep Learning Performance Documentation # `_ -# 에서 자세한 정보와 레이어 유형에 따른 가이드라인을 참조하세요. -# * 레이어 크기가 고정되지 않고 다른 매개변수에서 유도되는 경우에도 명시적으로 패딩할 수 있습니다. +# 에서 자세한 정보와 계층 유형에 따른 가이드라인을 참조하세요. +# * 계층 크기가 고정되지 않고 다른 매개변수에서 유도되는 경우에도 명시적으로 패딩할 수 있습니다. # (예시: NLP 모델의 어휘 크기 등). # # * AMP 활성화하기 @@ -478,13 +478,13 @@ def gelu(x): # 따르고 필요한 변화도 all-reduce를 수행해야 합니다. ############################################################################### -# ``DistributedDataParallel(find_unused_parameters=True)`` 를 사용할 때 생성자와 실행 레이어 순서를 일치시키는 방법 +# ``DistributedDataParallel(find_unused_parameters=True)`` 를 사용할 때 생성자와 실행 계층 순서를 일치시키는 방법 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # `torch.nn.parallel.DistributedDataParallel `_ -# 은 ``find_unused_parameters=True`` 와 함께 모델 생성자에서의 레이어와 파라미터 순서를 +# 은 ``find_unused_parameters=True`` 와 함께 모델 생성자에서의 계층과 매개변수 순서를 # 사용하여 ``DistributedDataParallel`` 변화도 all-reduce를 위한 버킷을 만듭니다. # ``DistributedDataParallel`` 은 all-reduce를 역전파와 겹치게 수행합니다. 특정 버킷에 대한 -# all-reduce는 주어진 버킷의 모든 파라미터에 대한 변화도가 모두 준비되었을 때 비동기적으로 작동됩니다. +# all-reduce는 주어진 버킷의 모든 매개변수에 대한 변화도가 모두 준비되었을 때 비동기적으로 작동됩니다. # # 최대로 겹치게 하려면 모델 생성자에서의 순서가 실제 실행 중인 순서와 대략적으로 일치해야 합니다. # 순서가 맞지 않으면 전체 버킷에 대한 all-reduce는 마지막으로 도착하는 변화도를 기다리게 되며, @@ -493,8 +493,8 @@ def gelu(x): # # ``find_unused_parameters=False`` 가 (기본 설정)인 ``DistributedDataParallel`` 은 # 역전파 중에 발견된 연산 순서를 기반으로 자동으로 버킷을 형성합니다. -# ``find_unused_parameters=False`` 를 사용할 때는 최적의 성능을 달성하기 위해 레이어나 -# 파라미터의 순서를 재조정할 필요가 없습니다. +# ``find_unused_parameters=False`` 를 사용할 때는 최적의 성능을 달성하기 위해 계층이나 +# 매개변수의 순서를 재조정할 필요가 없습니다. ############################################################################### # 분산 설정에서 작업 부하를 분산하는 방법 From e9560dba77ac29438c6869c9dc4701d76953475f Mon Sep 17 00:00:00 2001 From: rltq Date: Sun, 12 Apr 2026 07:27:39 +0900 Subject: [PATCH 3/7] =?UTF-8?q?docs:=20=EB=B2=88=EC=97=AD=EC=96=B4=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC=20-=20=EB=A7=A4=EA=B0=9C=EB=B3=80=EC=88=98?= =?UTF-8?q?=20(PR=20945)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipes_source/recipes/amp_recipe.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/recipes_source/recipes/amp_recipe.py b/recipes_source/recipes/amp_recipe.py index 35105687..adfd3506 100644 --- a/recipes_source/recipes/amp_recipe.py +++ b/recipes_source/recipes/amp_recipe.py @@ -198,7 +198,7 @@ def make_model(in_size, out_size, num_layers): # 변화도 확인/수정하기 (예: 클리핑) # -------------------------- # ``scaler.scale(loss).backward()`` 로 생성된 모든 변화도는 조정됩니다. -# 만약 ``backward()`` 와 ``scaler.step(optimizer)`` 사이에서 파라미터의 +# 만약 ``backward()`` 와 ``scaler.step(optimizer)`` 사이에서 매개변수의 # ``.grad`` 속성을 수정하거나 확인하고 싶다면, 먼저 # `scaler.unscale_(optimizer) `_ # 를 사용하여 변화도를 복원해야 합니다. @@ -210,10 +210,10 @@ def make_model(in_size, out_size, num_layers): loss = loss_fn(output, target) scaler.scale(loss).backward() - # 옵티마이저에 할당된 파라미터의 변화도를 제자리에서 복원합니다. + # 옵티마이저에 할당된 매개변수의 변화도를 제자리에서 복원합니다. scaler.unscale_(opt) - # 옵티마이저에 할당된 파라미터의 변화도가 이제 복원되었으므로, 평소와 같이 클리핑할 수 있습니다. + # 옵티마이저에 할당된 매개변수의 변화도가 이제 복원되었으므로, 평소와 같이 클리핑할 수 있습니다. # 이때 클리핑에 사용하는 max_norm 값은 변화도 조정이 없을 때와 동일하게 사용할 수 있습니다. torch.nn.utils.clip_grad_norm_(net.parameters(), max_norm=0.1) From 2340ce3df4d16f691507f7282dded087a81c4af7 Mon Sep 17 00:00:00 2001 From: rltq Date: Sun, 12 Apr 2026 07:31:43 +0900 Subject: [PATCH 4/7] =?UTF-8?q?docs:=20=EB=B2=88=EC=97=AD=EC=96=B4=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC=20-=20Drop-out=20(PR=20923)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beginner_source/introyt/tensorboardyt_tutorial.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beginner_source/introyt/tensorboardyt_tutorial.py b/beginner_source/introyt/tensorboardyt_tutorial.py index 19bbb270..85883c4b 100644 --- a/beginner_source/introyt/tensorboardyt_tutorial.py +++ b/beginner_source/introyt/tensorboardyt_tutorial.py @@ -220,7 +220,7 @@ def forward(self, x): # 검증 셋과 비교 running_vloss = 0.0 - # 평가 모드에서는 일부 모델의 특정 작업을 생략할 수 있습니다 예시: 드롭아웃 레이어 + # 평가 모드에서는 일부 모델의 특정 작업을 생략할 수 있습니다 예시: Drop-out 계층 net.train(False) # 평가 모드로 전환, 예시: 정규화(regularisation) 끄기 for j, vdata in enumerate(validation_loader, 0): vinputs, vlabels = vdata From 9ba233ab95646a680e2cd986e3d81d6713bd5b5a Mon Sep 17 00:00:00 2001 From: rltq Date: Sun, 12 Apr 2026 07:37:05 +0900 Subject: [PATCH 5/7] =?UTF-8?q?docs:=20=EB=B2=88=EC=97=AD=EC=96=B4=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC=20-=20=EC=9D=B8=EC=9E=90=20(PR=20879)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- recipes_source/recipes/tuning_guide.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes_source/recipes/tuning_guide.py b/recipes_source/recipes/tuning_guide.py index 28cbf16d..f04441d2 100644 --- a/recipes_source/recipes/tuning_guide.py +++ b/recipes_source/recipes/tuning_guide.py @@ -387,7 +387,7 @@ def gelu(x): # 장치에서 생성합니다. # ``torch.rand(size, device='cuda')`` # -# 이는 다음과 같이 ``device`` 인수를 받아 새로운 tensor를 생성하는 모든 함수에 적용됩니다: +# 이는 다음과 같이 ``device`` 인자를 받아 새로운 tensor를 생성하는 모든 함수에 적용됩니다: # `torch.rand() `_, # `torch.zeros() `_, # `torch.full() `_ From 0f6eb19519db9f0ebaf4edd7d709be7096525580 Mon Sep 17 00:00:00 2001 From: rltq Date: Sun, 12 Apr 2026 08:01:24 +0900 Subject: [PATCH 6/7] =?UTF-8?q?docs:=20=EB=B2=88=EC=97=AD=EC=96=B4=20?= =?UTF-8?q?=ED=86=B5=EC=9D=BC=20-=20=ED=98=BC=EB=8F=99=20=ED=96=89?= =?UTF-8?q?=EB=A0=AC,=20=EB=B3=80=ED=99=94=EB=8F=84,=20=EB=8F=84=EC=8B=9D?= =?UTF-8?q?=ED=99=94=20(PR=20869)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- intermediate_source/tiatoolbox_tutorial.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/intermediate_source/tiatoolbox_tutorial.rst b/intermediate_source/tiatoolbox_tutorial.rst index b8446300..73328b7f 100644 --- a/intermediate_source/tiatoolbox_tutorial.rst +++ b/intermediate_source/tiatoolbox_tutorial.rst @@ -130,7 +130,7 @@ TIAToolbox를 사용하면 `조직 import torch from torchvision import transforms - # 그래프 설정 + # 그래프 도식화 mpl.rcParams["figure.dpi"] = 160 # for high resolution figure in notebook mpl.rcParams["figure.facecolor"] = "white" # To make sure text is visible in dark mode @@ -381,7 +381,7 @@ PatchPredictor 클래스는 PyTorch로 작성된 CNN 기반 분류기를 실행 ~~~~~~~~~~~~~~~~~~~~ 예측기(predictor) 객체를 생성한 후 ``patch`` 모드를 사용하여 ``predict`` 메소드를 호출합니다. -그런 다음, 분류 정확도와 오차 행렬(confusion matrix)을 계산합니다. +그런 다음, 분류 정확도와 혼동 행렬(confusion matrix)을 계산합니다. @@ -395,7 +395,7 @@ PatchPredictor 클래스는 PyTorch로 작성된 CNN 기반 분류기를 실행 acc = accuracy_score(label_list, output["predictions"]) logger.info("Classification accuracy: %f", acc) - # 패치 분류 결과를 위한 오차 행렬(confusion_matrix) 생성 및 시각화 + # 패치 분류 결과를 위한 혼동 행렬(confusion_matrix) 생성 및 시각화 conf = confusion_matrix(label_list, output["predictions"], normalize="true") df_cm = pd.DataFrame(conf, index=class_names, columns=class_names) df_cm @@ -823,7 +823,7 @@ TIAToolbox는 PyTorch의 `nn.Module Date: Sun, 12 Apr 2026 08:02:27 +0900 Subject: [PATCH 7/7] =?UTF-8?q?docs:=20=EC=98=A4=ED=83=80=20=EC=A0=95?= =?UTF-8?q?=EC=A0=95=20-=20=EB=A9=94=EC=86=8C=EB=93=9C=20(PR=20927)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- advanced_source/semi_structured_sparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/advanced_source/semi_structured_sparse.py b/advanced_source/semi_structured_sparse.py index 753e831f..2888dfa3 100644 --- a/advanced_source/semi_structured_sparse.py +++ b/advanced_source/semi_structured_sparse.py @@ -502,7 +502,7 @@ def measure_execution_time(model, batch_sizes, dataset): ###################################################################### # 그 다음, 단일 가지치기 단계를 수행합니다. 모든 가지치기 도구(pruner)는 가지치기 도구의 구현 -# 논리에 따라 마스크를 업데이트하는 ``update_mask()`` 메서드를 구현합니다. 이 단계 메서드는 +# 논리에 따라 마스크를 업데이트하는 ``update_mask()`` 메소드를 구현합니다. 이 단계 메소드는 # 희소성 설정(sparse config)에서 지정된 가중치에 대해 이 ``update_mask`` 함수를 호출합니다. # # 또한 모델을 평가하여 미세 조정/재학습 없이 가지치기(zero-shot) 또는 가지치기의 정확도 저하를 보여줄 것입니다.