conda create --name FM_weights python==3.9
conda activate FM_weights
pip install -r requirements.txt
Get TieredImageNet
Local Data Directory
Download and extract data into data_root like below. For exmaple: data_root = /Users/zyxu/Documents/py/datasets
tiered_imagenet
├── tiered-imagenet-kwon
│ ├── test_images.npz
│ ├── test_labels.pkl
│ ├── train_images.npz
│ ├── train_labels.pkl
│ ├── val_images.npz
│ └── val_labels.pkl
Generate ${h_{c,t}}$
Modify data_root accordingly
python generate_pos_ctx.py --data_root /Users/zyxu/Documents/py/datasets --output_path output
Alternatively, you can download embeddings into output/ from here: 4sets_intermediate_outputs.pth
After getting the embeddings output/4sets_intermediate_outputs.pth. notebook/uncover/vis.ipynb contains visulizations and notebook/uncover/rank_compute.ipynb contains rank computation.
13 commits
Jupyter Notebook
99.8%
conda create --name FM_weights python==3.9
conda activate FM_weights
pip install -r requirements.txt
Get TieredImageNet
Local Data Directory
Download and extract data into data_root like below. For exmaple: data_root = /Users/zyxu/Documents/py/datasets
tiered_imagenet
├── tiered-imagenet-kwon
│ ├── test_images.npz
│ ├── test_labels.pkl
│ ├── train_images.npz
│ ├── train_labels.pkl
│ ├── val_images.npz
│ └── val_labels.pkl
Generate ${h_{c,t}}$
Modify data_root accordingly
python generate_pos_ctx.py --data_root /Users/zyxu/Documents/py/datasets --output_path output
Alternatively, you can download embeddings into output/ from here: 4sets_intermediate_outputs.pth
After getting the embeddings output/4sets_intermediate_outputs.pth. notebook/uncover/vis.ipynb contains visulizations and notebook/uncover/rank_compute.ipynb contains rank computation.
13 commits
Jupyter Notebook
99.8%