You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C++ correctness:
- Fix UB: MappedRowMajorMatrixXf used Eigen::Aligned over std::vector data
which is not SIMD-aligned. Switch the typedef to const + Unaligned and
drop the const_cast at every call site.
- IntegerLookup: replace abs(v) UB at INT64_MIN with a single-OOV-bucket
assertion (Keras hashes OOV across multiple buckets via FarmHash, which
fdeep does not currently replicate, so num_oov_indices > 1 is rejected).
- EinsumDense: assert rhs has at least 2 chars before slicing off the
leading batch dim.
- GRU: replace silent zero-fallback for malformed bias with an explicit
size assertion that respects reset_after.
- GroupedQueryAttention: assert num_key_value_heads > 0 before the modulo.
- AutoContrast removed from the passthrough dispatch — it transforms
deterministically at inference and isn't actually a no-op.
Performance:
- EinsumDense: precompute summed_strides instead of recomputing the inner
stride loop per output element.
Style:
- Make member fields const in newly-added layer classes for consistency
with the rest of the codebase.
- show_bidirectional_layer: validate merge_mode and reject
forward_layer.go_backwards explicitly.
Test coverage (added in get_test_model_recurrent):
- LSTM with return_state=True (h, c outputs) and unit_forget_bias=False.
- GroupedQueryAttention with num_query_heads == num_key_value_heads
(= MultiHeadAttention) and with distinct K/V sequence lengths.
- ConvLSTM1D with dilation_rate, two ConvLSTM2D layers chained.
- GroupNormalization with groups=1 (= LayerNorm) and groups=n_features
(= InstanceNorm).
- Discretization, Masking, RandomBrightness, RandomFlip, RandomCrop now
exercised end-to-end.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
0 commit comments