Skip to content

An Numpy and PyTorch Implementation of CKA-similarity with CUDA support

Notifications You must be signed in to change notification settings

jayroxis/CKA-similarity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

CKA-similarity

An PyTorch Implementation of CKA-similarity with CUDA support. Inspired by: https://github.com/yuanli2333/CKA-Centered-Kernel-Alignment

The Centered Kernel Alignment (CKA) method is from paper:

Similarity of Neural Network Representations Revisited. [https://arxiv.org/abs/1905.00414]

Running time for the example notebook

Numpy: 3min 8s

PyTorch: 15.3s

For large matrices, use PyTorch with CUDA to accelerate.

Dependencies

python3
numpy
gzip
torch

Tested environment: PyTorch v1.7.0, Python 3.6.9

About

An Numpy and PyTorch Implementation of CKA-similarity with CUDA support

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published