Skip to content

intermediate_source/ensembling.py 번역 진행 #796

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 12, 2024

Conversation

ChoHyoungSeo
Copy link
Contributor

라이선스 동의

변경해주시는 내용에 BSD 3항 라이선스가 적용됨을 동의해주셔야 합니다.

더 자세한 내용은 기여하기 문서를 참고해주세요.

동의하시면 아래 [ ][x]로 만들어주세요.

  • 기여하기 문서를 확인하였으며, 본 PR 내용에 BSD 3항 라이선스가 적용됨에 동의합니다.

관련 이슈 번호

이 Pull Request와 관련있는 이슈 번호를 적어주세요.

이슈 또는 PR 번호 앞에 #을 붙이시면 제목을 바로 확인하실 수 있습니다. (예. #999 )

PR 종류

이 PR에 해당되는 종류 앞의 [ ][x]로 변경해주세요.

  • 오탈자를 수정하거나 번역을 개선하는 기여
  • 번역되지 않은 튜토리얼을 번역하는 기여
  • 공식 튜토리얼 내용을 반영하는 기여
  • 위 종류에 포함되지 않는 기여

PR 설명

intermediate_source/ensembling.py 를 번역했습니다.

Copy link
Member

@hyoyoung hyoyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

문서 번역하느라 고생하셨습니다. 몇가지 사소한 수정사항 확인 부탁드립니다.

일반적으로 이 작업은 일부 입력값에 대해 각 모델을 개별적으로 실행한 다음 예측을 결합하는 방식으로 실행됩니다.
하지만 동일한 아키텍처로 모델을 실행하는 경우, ``torch.vmap`` 을 활용하여 함께 결합할 수 있습니다.
``vmap`` 은 입력 텐서의 여러 차원에 걸쳐 함수를 매핑하는 함수 변환입니다. 이 함수의
사용 사례 중 하나는 for 문을 제거하고 벡터화를 통해 속도를 높이는 것입니다.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

용어집을 보시면 텐서는 일반적으로 번역하지 않고 tensor로 쓰고 있습니다.

# 예를 들어, ``model[i].fc1.weight`` 의 shape은 ``[784, 128]`` 입니다.
# 이 10개의 모델 각각에 대해 ``.fc1.weight`` 를 쌓아 ``[10, 784, 128]`` shape의 큰 가중치를 생성할 수 있습니다.
#
#
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

공백이 두줄인데, 한줄은 불필요한 것 같습니다

# given parameters and buffers and inputs, run the model using those
# parameters, buffers, and inputs. We'll use ``torch.func.functional_call``
# to help out:
# 다음으로, ``vmap`` 에 대한 함수를 정의해야 합니다. 이 함수는 파라미터, 버퍼 그리고 입력값이 주어지면 모델을 실행합니다.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'파라미터, 버퍼 그리고 입력값'로 해도 좋지만
'파라미터, 버퍼, 입력값'으로 바꿔도 좋을 것 같습니다

# Construct a "stateless" version of one of the models. It is "stateless" in
# the sense that the parameters are meta Tensors and do not have storage.
# 모델 중 하나의 "stateless" 버전을 구축합니다.
# "stateless"는 매개변수가 메타 텐서이며 저장소가 없다는 것을 의미합니다.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tensor

@ChoHyoungSeo
Copy link
Contributor Author

Review 주셔서 감사합니다. 말씀해주신 부분 수정하여 commit 했습니다!

Copy link
Contributor

@ganghe74 ganghe74 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앙상블도 지원하는 건 처음 알았네요, 번역하시느라 고생 많으셨습니다 !
번역에 큰 문제는 없는 것 같습니다.

# 일반적으로, ``vmap`` 을 사용한 벡터화는 for 문에서 함수를 실행하는 것보다
# 빠르며 수동 일괄 처리와 비슷한 속도를 냅니다. 하지만 특정 연산에 대해 ``vmap`` 규칙을
# 구현하지 않았거나 기본 커널이 구형 하드웨어(GPUs)에 최적화되지 않은 경우와 같이
# 몇 가지 예외가 있습니다. 이러한 경우가 발견되면, Github에 이슈를 생성해서 알려주시기 바랍니다.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

매우 사소한 요소인데, Github => GitHub 이 맞는 표기입니다.

@ChoHyoungSeo
Copy link
Contributor Author

앗, 꼼꼼히 review 해주셔서 감사합니다! 말씀해주신 부분 수정 완료했습니다.

Copy link
Member

@hyoyoung hyoyoung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@hyoyoung hyoyoung merged commit 10b3e82 into PyTorchKorea:master May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants