Skip to content

Modify docs: Translate mobilenet_v2 Eng to Kor #15

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

petanerd
Copy link

@petanerd petanerd commented Jul 29, 2022

라이선스 동의

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

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

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

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

관련 이슈 번호

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

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

PR 종류

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

  • 오탈자를 수정하거나 번역을 개선하는 기여
  • 번역되지 않은 모델 소개를 번역하는 기여
  • 공식 허브의 내용을 반영하는 기여
  • 위 종류에 포함되지 않는 기여

PR 설명

이 PR로 무엇이 달라지는지 대략적으로 알려주세요.

pytorch_vision_mobilenet_v2 한글 번역

Copy link

@yh00214 yh00214 left a comment

Choose a reason for hiding this comment

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

수고하셨습니다!

Comment on lines -26 to +28
All pre-trained models expect input images normalized in the same way,
i.e. mini-batches of 3-channel RGB images of shape `(3 x H x W)`, where `H` and `W` are expected to be at least `224`.
The images have to be loaded in to a range of `[0, 1]` and then normalized using `mean = [0.485, 0.456, 0.406]`
and `std = [0.229, 0.224, 0.225]`.
모든 사전 훈련된 모델들은 입력 이미지가 동일한 방식으로 정규화되었다고 상정합니다.
즉, 미니 배치(mini-batch)의 3-채널 RGB 이미지들은 `(3 x H x W)`의 형태를 가지며, 해당 `H`와 `W`는 최소 `224` 이상이어야 합니다.
각 이미지는 `[0, 1]`의 범위 내에서 로드되어야 하며, `mean = [0.485, 0.456, 0.406]` 과 `std = [0.229, 0.224, 0.225]`을 이용해 정규화되어야 합니다.
Copy link

Choose a reason for hiding this comment

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

PyTorchKorea/hub-kr@df0adb6

기존에 VGG_NET의 번역 PR에서 해당 부분과 똑같은 문장을 번역했었습니다.
번역이 조금 다르지만 번역 상 문제가 있다곤 생각되지 않으며, mindongjun 님께서 참고 후 수정이 필요하면 수정하시면 될 것 같습니다.
다만, 해당 PR 리뷰에서 '각 이미지는 [0,1] 범위 내에서 로드되어야 하며' 부분에 대해, 로드되어야 한다는 말의 의미를 추가해줬으면 좋겠다고 하였고 실제 이를 반영하여 최종 Merge가 되었습니다. 따라서 통일성을 위해 PR 해주신 문서에도 해당 내용을 추가해 주시면 좋을 것 같다고 생각합니다.

if torch.cuda.is_available():
input_batch = input_batch.to('cuda')
model.to('cuda')

with torch.no_grad():
output = model(input_batch)
# Tensor of shape 1000, with confidence scores over Imagenet's 1000 classes
# output은 1000개의 Tensor 형태이며, 이는 Imagenet 데이터 셋의 1000개 클래스에 대한 신뢰도 점수를 나타내는 결과
Copy link

Choose a reason for hiding this comment

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

https://github.com/PyTorchKorea/tutorials-kr/blob/master/TRANSLATION_GUIDE.md

TRANSLATION_GUIDE.md에 따라, 'output'은 '출력'으로 번역하기를 권장합니다.

print(output[0])
# The output has unnormalized scores. To get probabilities, you can run a softmax on it.
# output 결과는 정규화되지 않은 결과. 확률을 얻기 위해선 softmax를 거쳐야 함.
Copy link

Choose a reason for hiding this comment

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

https://github.com/PyTorchKorea/tutorials-kr/blob/master/TRANSLATION_GUIDE.md

  1. TRANSLATION_GUIDE.md에 따라, 'output'은 '출력'으로 번역하는 게 좋다고 생각합니다.
  2. 용어집에는 없지만, 'softmax'를 '소프트맥스'로 적어도 좋을 것 같습니다.(팀 문서에 용어집 추가할 내용으로 적어뒀습니다.)
  3. softmax를 거쳐야 함 이란 말이 초보자들에게 이해가 되지 않을 수 있다고 생각합니다. 의미를 좀 더 명확하게 '소프트맥스 함수를 취해줘야 함.' 이라 하면 좋을 것 같은데, 이 부분 생각이 궁금합니다.

Copy link

@yh00214 yh00214 left a comment

Choose a reason for hiding this comment

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

추가로 리뷰 진행했습니다. 다시 한 번 수고하셨습니다~

Comment on lines -86 to +85
The MobileNet v2 architecture is based on an inverted residual structure where the input and output of the residual block are thin bottleneck layers opposite to traditional residual models which use expanded representations in the input. MobileNet v2 uses lightweight depthwise convolutions to filter features in the intermediate expansion layer. Additionally, non-linearities in the narrow layers were removed in order to maintain representational power.
MobileNet v2 아키텍처는 residual block의 입력 및 출력이 입력단에서 확장 표현을 사용하는 기존의 residual 모델과 반대되는 얇은 병목 계층인 반전된 residual 구조를 기반으로 합니다. MobileNet v2는 경량화된 depthwise convolutions를 사용하여 중간 확장 계층의 특징 들을 필터링합니다. 또한, 표현력 유지를 위해 좁은 계층의 비선형성은 제거되었습니다.
Copy link

Choose a reason for hiding this comment

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

'residual block의 입력 및 출력이 입력단에서 확장 표현을 사용하는 기존의 residual 모델과 반대되는 얇은 병목 계층인 반전된 residual 구조를 기반으로 합니다.' 부분이 문장이 길고 수식어가 많아 읽는 입장에서 잘못 이해할 수 있을 것 같습니다. '입력단에서 확장 표현을 사용하는 기존의 residual 모델과 반대되게, residual block의 입력 및 출력이 얇은 병목 계층인 반전된 residual 구조를 기반으로 합니다.' 로 문장 내 순서를 바꾸면 의미가 좀 더 명확할 것 같습니다.

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.

2 participants