Skip to content

1.26.3

Latest
Compare
Choose a tag to compare
@PINTO0309 PINTO0309 released this 11 Dec 23:40
  • MatMul
    Fix incorrect tensor expansion in MatMul 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

New Contributors

Full Changelog: 1.26.2...1.26.3