NH
nh2seven/MAML_pth
PyTorch implementations of various classification models adapted for few-shot learning using Model-Agnostic Meta-Learning.
MAML_pth
PyTorch implementations of various classification models adapted for few-shot learning using Model-Agnostic Meta-Learning.
The model is trained on the miniImageNet dataset using class-balanced episodic tasks.
Features
- PyTorch implementations of various models, adapted for MAML
- Meta-learning framework for few-shot tasks
- Support for N-way K-shot training episodes
- Few-shot learning support
- Training on miniImageNet dataset
- Checkpoint management for model states
- Inference pipeline for predictions
Requirements
- Python 3.11+
- PyTorch 2.5+ (with CUDA 12.6)
- Kaggle API credentials
Setup
-
(Optional) Create a virtual environment:
python -m venv venv source venv/bin/activate # OR conda create --name myenv python=3.11 conda activate myenv
-
Install dependencies:
pip install -r requirements.txt
-
Download and organize the dataset:
chmod +x setup.sh ./setup.sh
Usage
Run the meta-learning training process:
python main.pyYou can modify training/evaluation settings in config.yaml.
References
On this page
Languages
Python91.9%Shell8.1%
Contributors
Latest Release
v0.1.0May 28, 2025GNU General Public License v3.0
Created April 3, 2025
Updated September 21, 2025