Skip to content
Merged

dev #15

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ name: CI
on:
push:
branches: [main, dev]
pull_request:
branches: [main]

jobs:
test:
Expand Down
2 changes: 1 addition & 1 deletion cka/cka.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def _compute_cka_matrix(
) -> torch.Tensor:
denominator = torch.sqrt(torch.clamp(hsic_xx.unsqueeze(1) * hsic_yy.unsqueeze(0), min=0.0))
denominator = torch.where(denominator == 0, 1e-6, denominator)
return hsic_xy / denominator
return torch.clamp(hsic_xy / denominator, min=0.0, max=1.0)

def _make_hook(
self,
Expand Down