Skip to content

Chacrk/MSML_Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MSML_Project

Python code for paper "Multi-stage Meta-Learning for Few-Shot with Lie Group Network Constraint"

1. Environment

1.1. Requirements

  1. Python 3.X
  2. PyTorch (ver>=0.4)
  3. Numpy
  4. mini-ImageNet dataset
  5. zipfile

1.2. Testing Environment

1.2.1 Software:
  • Ubuntu 16.04
  • Python 3.6.1
  • PyTorch 1.0.1
  • Numpy 1.17.2
1.2.2 Hardware:
  • CPU: Intel Xeon E5-2620 v4 @2.10GHz with 8 Cores
  • GPU: NVIDIA TITAN Xp with CUDA 8.0.61

2. File Structure

MSML_Project

└─data
 └─miniimagenet
   ├─images
    ├─nxx.jpg
    ├─...
   ├─train.csv
   ├─val.csv
   ├─test.csv
 ─proc_images.py
└─meta
  ├─main.py
  ├─model.py
  ├─net_meta.py
  ├─data_provider_meta.py
└─pretrain
  ├─pretrain.py
  ├─data_provider.py
  ├─net.py

3. Experiment Details

3.1. Computing resource usage

RAM GPU Memory
Pretrain Phase 1500MB 6267MB
5-way 1-shot 1800MB 8767MB
5-way 5-shot 1800MB 10157MB

3.2 Processes

3.2.1 prepare dataset
  1. download mini-ImageNet dataset, images are croped to 84* 84 pixels.
  2. put mini-ImageNet.zip in folder MSML_project/data/.
  3. run proc_dataset.py to unzip file and copy all images to folder MSML_Project/data/miniimagenet/images/.
3.2.2 Pretrain
  1. run MSML_Project/pretrain/pretrain.py to get pretrain weight.
3.3.3 Meta-Train & Meta-Test
  1. finish pretrain phase
  2. run MSML_Project/meta/main.py

3.3. Speed

iter/s total time
Pretrain 2.64 5h-10m-46s
5-way 1-shot 0.7 6h-51m-34s
5-way 5-shot 0.26 19h-23m-45s

Releases

No releases published

Packages

 
 
 

Languages