MatMul
Fix incorrect tensor expansion inMatMul
operation
1. Content and background
The MatMul operation was incorrectly handling 1-dimensional tensors by expanding
the wrong input tensor. When handling a 1D input tensor (shape [256])
, it was
erroneously expanding input_tensor_2 (shape [256, 254])
instead of input_tensor_1
,
leading to incorrect shape transformations.
2. Summary of corrections
Changed:
input_tensor_1 = tf.expand_dims(input_tensor_2, axis=0)
to
input_tensor_1 = tf.expand_dims(input_tensor_1, axis=0)
This ensures the correct tensor is expanded when handling 1D inputs.
3. Before/After
Before:
Input1 shape: [256] -> incorrectly became [1,256,254]
Input2 shape: [256,254] remained unchanged
After:
Input1 shape: [256] -> correctly becomes [1,256]
Input2 shape: [256,254] remains unchanged
What's Changed
- renamed replace_GRU.json to allow cloning to Windows by @kwikwag in #718
- Bugfix in MatMul.py by @oesi333 in #725
New Contributors
Full Changelog: 1.26.2...1.26.3