Skip to content

Commit b745034

Browse files
committed
Adjusting the tau value issue.
1 parent e9c422b commit b745034

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ If this toolkit helps your research, please cite:
261261
author={Chen, Benedict},
262262
year={2025},
263263
url={https://github.com/benedictchen/meta-learning-toolkit},
264-
version={2.0.0}
264+
version={2.3.0}
265265
}
266266
```
267267

meta_learning/core/math_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ def cosine_logits(a: torch.Tensor, b: torch.Tensor, tau: float = 10.0) -> torch.
6565
Args:
6666
a: [N, D] query features
6767
b: [M, D] support features
68-
tau: Temperature scaling parameter (higher = more confident)
68+
tau: Temperature scaling parameter (higher = less confident)
6969
7070
Returns:
7171
[N, M] cosine similarity logits
7272
7373
Mathematical Foundation:
7474
- Epsilon guard prevents division by zero when ||x|| = 0
7575
- Temperature scaling controls prediction confidence
76-
- Higher tau → sharper probability distributions
76+
- Higher tau → softer probability distributions (higher entropy)
7777
"""
7878
eps = _eps_like(a)
7979
# L2 normalize with epsilon guard against zero norms

0 commit comments

Comments
 (0)