Skip to content

dongminlee94/meta-learning-for-everyone

Repository files navigation

Language grade: Python License: MIT Python 3.8.8 PyTorch 1.8.1 Code style: black Imports: isort Linting: flake8 & mypy & pylint All Contributors

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

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

필요 조건

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

설치 및 사용 방법

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한 뒤, 다음의 명령어를 실행하여 필요한 패키지들을 설치해주세요.

# 사용자
$ make init

# 개발자
$ make init-dev

4. 모델 학습 및 결과 확인

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

$ jupyter notebook

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

$ rl2_trainer.py

# or

$ maml_trainer.py

# or

$ pearl_trainer.py

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

$ tensorboard --logdir=./results

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Dongmin Lee

💻 📖

Seunghyun Lee

💻

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