How does one do similarity comparison of neural networks in tensorflow or keras?

I wanted to run pwcca, svcca, CKA, OP etc in tensorflow to analyze the similarity of neural networks. What is the recommended api/interface for tensorflow for this?

e.g./context:

and

crossposted: https://www.reddit.com/r/learnmachinelearning/comments/qapw3a/how_does_one_do_similarity_comparison_of_neural/

Google had something , but not TF related, at:

I remeber UCS Sail had something for TF/Keras related to their proposed MCCA:

Probably there are also some other sparse initiatives on GitHub

1 Like