dongminlee94 / meta-learning-for-everyone

"모두를 위한 메타러닝" 책에 대한 코드 저장소

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Language grade: Python License: Apache 2.0 Python 3.8.8 PyTorch 1.9.1 Code style: black Imports: isort Linting: flake8 & pylint

All Contributors

This repository supports English. If you use English, move to language/english branch.

모두를 위한 메타러닝: PyTorch를 활용한 Few-shot 학습 모델과 빠른 강화학습 에이전트 만들기

"모두를 위한 메타러닝" 책에 대한 코드 레포지토리입니다.

필요 조건

이 레포지토리에서는 python 3.8.15 버전을 사용합니다.

설치 및 사용 방법

1. Anaconda 설치

먼저, 아래의 링크에서 Anaconda를 설치합니다.

https://www.anaconda.com/

2. Anaconda 환경 만들기

다음으로, 아래의 명령어들을 통해 새로운 python 환경을 만들고, 그 환경을 활성화합니다.

(base) $ conda create -y -n meta python=3.8.8

(base) $ conda activate meta

(meta) $ conda env list

3. 패키지 설치

이어서, 이 레포지토리를 clone한 뒤, 다음의 명령어를 실행하여 필요한 패키지들을 설치해주세요.

MacOS 및 Linux 사용자

# 사용자
(meta) $ make init

# 개발자
(meta) $ make init-dev

Windows 사용자

# 사용자
(meta) $ "./scripts/window-init.bat"

4. 모델 학습 및 결과 확인

Meta-SL

Meta-SL은 각 알고리즘 폴더로 이동하여 jupyter notebook을 이용하여 해당 알고리즘을 실행해주시고 결과를 확인해주세요.

(meta) $ jupyter notebook

Colab을 이용하실 경우, Colab에서 Torchmeta 설치하기 가이드를 참고하여 Torchmeta를 설치하고 이용해주세요.

Meta-RL

Meta-RL은 각 알고리즘 폴더로 이동하여 아래의 명령어들을 이용하여 실행해주세요.

# RL^2
(meta) $ python rl2_trainer.py

# MAML
(meta) $ python maml_trainer.py

# PEARL
(meta) $ python pearl_trainer.py

Meta-RL의 경우, 텐서보드를 이용하여 학습 결과를 확인해주세요.

(meta) $ tensorboard --logdir=./results

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Dongmin Lee

💻 📖

Seunghyun Lee

💻 📖

Luna Jang

💻

Seungjae Ryan Lee

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

About

"모두를 위한 메타러닝" 책에 대한 코드 저장소

License:Apache License 2.0


Languages

Language:Jupyter Notebook 84.8%Language:Python 15.1%Language:Makefile 0.1%Language:Batchfile 0.0%Language:Shell 0.0%