Skip to content

Conversation

@Talmaj
Copy link
Owner

@Talmaj Talmaj commented Nov 4, 2025

Summary of Changes

BatchNorm Fixes & Improvements

  • Fixed critical bias bug: Corrected line 59 in batchnorm.py where bias was incorrectly set to scale instead of B
  • Fixed inference mode for batch_size > 1: Explicitly set BatchNorm to eval mode to use running statistics (ONNX inference behavior) Inconsistency between pytorch and onnxruntime #44
  • Removed experimental flag: BatchNorm now works correctly with batch_size > 1 by default Why batch_norm will give false outputs when batch_size>1 #35
  • Added comprehensive tests: Validated against onnxruntime with various batch sizes (1, 2, 4, 8), channels, spatial dimensions, epsilon values, and momentum values

New Operators

ReduceSumSquare

  • Implemented ReduceSumSquare operator: Computes sum(x^2) along specified axes
  • Supports both opset versions: Handles axes as attribute (opset < 13) and as optional input (opset >= 13)
  • Comprehensive test coverage: 16+ parametrized test cases validating against onnxruntime with different input shapes, axes, and keepdims settings

LogSoftmax

@Talmaj Talmaj merged commit 3cfc8f8 into master Nov 4, 2025
4 checks passed
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.

3 participants