Skip to content

fix nan mean#18

Open
Jah-yee wants to merge 3 commits into
thinking-machines-lab:mainfrom
Jah-yee:fix-nan-mean
Open

fix nan mean#18
Jah-yee wants to merge 3 commits into
thinking-machines-lab:mainfrom
Jah-yee:fix-nan-mean

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Apr 15, 2026

  • Add test suite and fix NaN for empty dimension
  • feat: add softmax operation support
  • fix(mean_kernel): handle empty dimension to avoid NaN

RoomWithOutRoof and others added 3 commits April 15, 2026 22:49
- Add comprehensive tests in tests/test_batch_invariant_ops.py
- Fix mean_dim to handle empty dimension (return zeros instead of NaN)

Good day,

Thank you for your work on this excellent library!

Warmly,
RoomWithOutRoof
Added softmax along with log_softmax, expanding batch-invariant operations.

Good day!

Warmly,
RoomWithoutRoof
Fixes Issue thinking-machines-lab#15: Fix NaN in mean_kernel for empty dimension

When the reduction dimension is empty (N==0), return 0 to avoid NaN.

Good day!

Warmly, RoomWithoutRoof
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant