Skip to content

Commit 1a0d96f

Browse files
author
Alexander Ororbia
committed
minor edits
1 parent d59e9bd commit 1a0d96f

2 files changed

Lines changed: 6 additions & 9 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Python 3.11.4 (main, MONTH DAY YEAR, TIME) [GCC XX.X.X] on linux
7272
Type "help", "copyright", "credits" or "license" for more information.
7373
>>> import ngclearn
7474
>>> ngclearn.__version__
75-
'3.1.0'
75+
'3.1.1'
7676
```
7777

7878
<i>Note:</i> For access to the previous Tensorflow-2 version of ngc-learn (of

ngclearn/utils/analysis/effective_dim.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,15 @@ def participation_ratio(latent_codes):
2020

2121
return tr2_cov / cov2_tr if cov2_tr > 0 else float("nan")
2222

23-
24-
25-
2623
def rankme(Z, eps=1e-7):
2724
"""
28-
Calculates the effective rank of for a code matrix Z
29-
effective rank = exp(Shannon entropy), from Garrido, Balestriero,
30-
Najman & LeCun, "RankMe: Assessing the Downstream Performance of Pretrained
31-
Self-Supervised Representations by Their Rank" (ICML 2023, arXiv:2210.02885).
25+
Calculates the effective rank of for a code matrix Z effective rank = exp(Shannon entropy), adapted from:
26+
27+
| Garrido, Balestriero, Najman & LeCun, "RankMe: Assessing the Downstream Performance of Pretrained
28+
| Self-Supervised Representations by Their Rank" (ICML 2023, arXiv:2210.02885).
3229
3330
Args:
34-
latent_codes: a set of (N x D) latent code vectors (one row per vector code)
31+
Z: a set of (N x D) latent code vectors (one row per vector code)
3532
3633
Returns:
3734
scalar measurement of the effective dimension

0 commit comments

Comments
 (0)