[Feat] decoder multi-base 설계 반영 - state_vec 확장 및 return_logits 추가#9
Open
ohchanju3 wants to merge 3 commits into
Open
[Feat] decoder multi-base 설계 반영 - state_vec 확장 및 return_logits 추가#9ohchanju3 wants to merge 3 commits into
ohchanju3 wants to merge 3 commits into
Conversation
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.
개요
multi-base 설계 반영 및 state 표현력 개선을 위해 decoder.py를 수정했습니다.
변경 내용
model/decoder.py
역할: 매 step마다 현재 state(query)와 encoded_flights(key)를 attention으로 비교해 다음 action 확률 반환
state_vec 38 → 71차원으로 확장
airport_emb_dim + 6→airport_emb_dim * 2 + 7return_logits 옵션 추가
torch.log(softmax(x))보다F.log_softmax(x)가 수치적으로 안정적return_logits=True면 softmax 전 raw score 반환 → 외부에서 F.log_softmax 적용추후 확인 필요
state_to_vec()에 rest_remaining 스칼라 추가 필요 (6개 → 7개, TODO 주석 남겨둠)airport_emb_dim과 decoder 값 일치해야 함