This repository contains the code for our concept graph embedding models (CGEM). The codebase is implemented using PyTorch and tested on Ubuntu 16.04.4 LTS
Install Anaconda.
Create and activate a virtual environment.
conda create --name cgem python=3.9
conda activate cgem
The code is tested with python 3.9, cuda == 10.2, and pytorch == 1.12.1. Install the required additional packages.
pip install -r requirements.txt
All datset must be downloaded to a directory '../_dataset' and must follow the below organization.
├──_dataset/
├──cub/
├──images/
...
├──ConceptGraphEmbedding/
├──train.py
├──config.py
├──dataset/
├──models/We refer to CEM's repository to download and prepare data.
dataset: contains scripts to load the datasets used in our experimentsmodels: contains the implementations of our concept encoder and concept GCN models