intermediate_source/ensembling.py 번역 진행 - #796
Merged
Merged
Conversation
hyoyoung
requested changes
Jan 28, 2024
hyoyoung
left a comment
Member
There was a problem hiding this comment.
문서 번역하느라 고생하셨습니다. 몇가지 사소한 수정사항 확인 부탁드립니다.
| 일반적으로 이 작업은 일부 입력값에 대해 각 모델을 개별적으로 실행한 다음 예측을 결합하는 방식으로 실행됩니다. | ||
| 하지만 동일한 아키텍처로 모델을 실행하는 경우, ``torch.vmap`` 을 활용하여 함께 결합할 수 있습니다. | ||
| ``vmap`` 은 입력 텐서의 여러 차원에 걸쳐 함수를 매핑하는 함수 변환입니다. 이 함수의 | ||
| 사용 사례 중 하나는 for 문을 제거하고 벡터화를 통해 속도를 높이는 것입니다. |
Member
There was a problem hiding this comment.
용어집을 보시면 텐서는 일반적으로 번역하지 않고 tensor로 쓰고 있습니다.
| # 예를 들어, ``model[i].fc1.weight`` 의 shape은 ``[784, 128]`` 입니다. | ||
| # 이 10개의 모델 각각에 대해 ``.fc1.weight`` 를 쌓아 ``[10, 784, 128]`` shape의 큰 가중치를 생성할 수 있습니다. | ||
| # | ||
| # |
| # 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`` 에 대한 함수를 정의해야 합니다. 이 함수는 파라미터, 버퍼 그리고 입력값이 주어지면 모델을 실행합니다. |
Member
There was a problem hiding this comment.
'파라미터, 버퍼 그리고 입력값'로 해도 좋지만
'파라미터, 버퍼, 입력값'으로 바꿔도 좋을 것 같습니다
| # 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"는 매개변수가 메타 텐서이며 저장소가 없다는 것을 의미합니다. |
Contributor
Author
|
Review 주셔서 감사합니다. 말씀해주신 부분 수정하여 commit 했습니다! |
ganghe74
approved these changes
Jan 28, 2024
ganghe74
left a comment
Contributor
There was a problem hiding this comment.
앙상블도 지원하는 건 처음 알았네요, 번역하시느라 고생 많으셨습니다 !
번역에 큰 문제는 없는 것 같습니다.
| # 일반적으로, ``vmap`` 을 사용한 벡터화는 for 문에서 함수를 실행하는 것보다 | ||
| # 빠르며 수동 일괄 처리와 비슷한 속도를 냅니다. 하지만 특정 연산에 대해 ``vmap`` 규칙을 | ||
| # 구현하지 않았거나 기본 커널이 구형 하드웨어(GPUs)에 최적화되지 않은 경우와 같이 | ||
| # 몇 가지 예외가 있습니다. 이러한 경우가 발견되면, Github에 이슈를 생성해서 알려주시기 바랍니다. |
Contributor
There was a problem hiding this comment.
매우 사소한 요소인데, Github => GitHub 이 맞는 표기입니다.
Contributor
Author
|
앗, 꼼꼼히 review 해주셔서 감사합니다! 말씀해주신 부분 수정 완료했습니다. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
라이선스 동의
변경해주시는 내용에 BSD 3항 라이선스가 적용됨을 동의해주셔야 합니다.
더 자세한 내용은 기여하기 문서를 참고해주세요.
동의하시면 아래
[ ]를[x]로 만들어주세요.관련 이슈 번호
이 Pull Request와 관련있는 이슈 번호를 적어주세요.
이슈 또는 PR 번호 앞에 #을 붙이시면 제목을 바로 확인하실 수 있습니다. (예. #999 )
PR 종류
이 PR에 해당되는 종류 앞의
[ ]을[x]로 변경해주세요.PR 설명
intermediate_source/ensembling.py 를 번역했습니다.