728x90 반응형 분류 전체보기628 Module의 상태(state)-Parameter and Buffer 시작하기이 문서에서는 nn.Module 안에학습 대상인 Parameter와학습 대상은 아니지만 모델 상태로 관리되는 Buffer를 어떻게 추가하는지를 설명함.이는 Module 객체의 메서드 parameters(), named_buffers(), state_dict() 들이 무엇을 기준으로 동작하는지 훨씬 명확하게 파악할 수 있게 해줌.권장사항이 글을 보고나서 다음 글의 3. Module의 메서드들 을 다시 한번 읽어볼 것:2024.04.12 - [Python] - [PyTorch] Custom Model 과 torch.nn.Module의 메서드들. [PyTorch] Custom Model 과 torch.nn.Module의 메서드들.Custom Model 만들기0. nn.Module torch.nn.Mod.. 2026. 4. 9. pytorch-torchinfo 란 1. torchinfo 란?torchinfo는 PyTorch 모델의 구조를 표 형태로 요약해서 보여주는 도구 (formerly torch-summary). 주로 다음을 확인할 때 사용됨:각 layer의 출력 shapeparameter 수trainable 여부nested module 구조실제 forward()를 따라가며 형상이 어떻게 변하는지공식 URL은 다음임:https://github.com/tyleryep/torchinfo GitHub - TylerYep/torchinfo: View model summaries in PyTorch!View model summaries in PyTorch! Contribute to TylerYep/torchinfo development by creating an acc.. 2026. 4. 9. Multi-Head Self Attention - Transformer Encoder Multi-Head Self-Attention입력 sequence의 각 token이 같은 sequence 내부의 다른 모든 token을 참고하여,문맥적으로 중요한 정보에 더 크게 반응하도록 만드는 Transformer의 핵심 mechanism임.위의 내용은 (Single-Head) Self-Attention에 해당하는 것이며,Multi-Head 에 대한 설명은 다음을 참고각 head는 Scaled Dot-Product Attention을 독립적으로 수행 하며,서로 다른 head들이 서로 다른 관계(position relation, semantic relation, syntactic relation 등)를 병렬적으로 보는 역할 을 담당함.또한 hidden_size ($d_\text{model}$)를 여러 .. 2026. 4. 7. Gemini-cli : Gemini CLI Companion Gemini CLI Companion 은 vscode의 extension(확장 프로그램)으로Gemini CLI와 vscode가 연동되게 해 줌. Gemini CLI가 지금 VS Code에서 개발자가 현재 무엇을 보고 있는지 더 잘 이해하게 해 주는 extension임요구조건VS Code 버전 1.99.0 이상Gemini CLI가 설치되어 있어야 함. (WSL의 vscode면 WSL의 해당 distro에 gemini-cli가 설치되어야함)Gemini CLI를 VS Code의 integrated terminal 안에서 실행되어야 함.공식 참고 문서https://geminicli.com/docs/ide-integration/#vs-code-companion-extension IDE Integration gem.. 2026. 4. 2. pytest - tutorial pytest 란?pytest는 Python 생태계에서 가장 널리 사용되는 test framework. 간결한 문법으로 단위 테스트(unit test)부터 통합 테스트(integration test)까지 다양한 수준의 테스트를 작성할 수 있음. 표준 라이브러리인 unittest와 달리,pytest는 별도의 클래스 상속 없이 일반 함수 형태로 테스트를 작성할 수 있음.assert 구문만으로도 풍부한 실패 메시지(failure message)를 자동 생성.fixture, parametrize, 플러그인(plugin) 시스템 등 강력한 기능을 제공이를 통해 테스트 코드의 재사용성과 유지보수성을 크게 향상2024.09.24 - [Python] - [Py] assert 구문 (statement) [Py] asse.. 2026. 4. 1. Gemini-cli: Custom Slash Command 만들기 이 문서는 Gemini CLI에서 슬래시(/)로 시작하는 custom slash command 정의하고 사용하는 방법을 기술.1. OverviewCustom slash command 를 추가하면 복잡한 프롬프트를 짧은 명령어로 저장해 두고 필요할 때마다 호출할 수 있음.예를 들어 /review "초보자"와 같은 형식으로 코드 리뷰를 요청할 수 있음.2. 저장 위치 (Storage Locations)Custom slash command 의 정의(or 설정) 파일(.toml)은 다음 두 위치 중 하나에 저장 가능함:Global Commands (All projects): ~/.gemini/commands/Local Commands (Project-specific): .gemini/commands/ (Rela.. 2026. 3. 26. 이전 1 2 3 4 ··· 105 다음 728x90 반응형