Skip to content

OpenXAIProject/dac

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DAC

Pytorch implementation of the paper Towards deep amortized clustering

Requirements

Python >= 3.5.0
torch >= 1.3.0
torchvision >= 0.5.0
tqdm
wget
sklearn

Usage

Setup

  • Install required packages
pip install -r requirements.txt
  • First modify ROOT variable in utils/paths.py to your working directory.

Mixture of Gaussians

  • Training
python -m scripts.run \
    --model models/mog.py \
    --loss_type (min or anc) \
    --run_name (your experiment id) \
    --gpu (gpu number to work with)
  • Test clustering on benchmark datasets
python -m scripst.test_cluster \
    --model models/mog.py \
    --loss_type (min or anc) \
    --run_name (your experiment id) \
    --gpu (gpu number to work with)
  • Visualizing clustering
python -m scripts.vis_cluster \
    --model models/mog.py \
    --loss_type (min or anc) \
    --run_name (your experiment id) \
    --gpu (gpu number to work with) \
    --vB (number of datasets) \
    --vN (max number of points per dataset) \
    --vK (max number of clusters per dataset)

For mixture of warped Gaussians

  • Same as above, but change --model argument to models/warped.py.

Releases

No releases published

Packages

No packages published

Languages