keras icon indicating copy to clipboard operation
keras copied to clipboard

Raise error when inputs and mask don't have same shape in Softmax

Open SuryanarayanaY opened this issue 1 year ago • 1 comments

Currently keras.layers.Softmax not having check to verify inputs and mask shape same or not. As per documnetation the mask should be A boolean mask of the same shape as inputs.

But Its generating output even though mask shape is not same as that of inputs.

Hence proposing a check to raise exception when inputs and mask don't have same shape.

Fixes #19722 .

SuryanarayanaY avatar May 20 '24 08:05 SuryanarayanaY

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 56.30%. Comparing base (a05ac12) to head (55d34df). Report is 195 commits behind head on master.

Files Patch % Lines
keras/src/layers/activations/softmax.py 0.00% 1 Missing and 1 partial :warning:

:exclamation: There is a different number of reports uploaded between BASE (a05ac12) and HEAD (55d34df). Click for more details.

HEAD has 6 uploads less than BASE
Flag BASE (a05ac12) HEAD (55d34df)
keras 4 1
keras-torch 1 0
keras-tensorflow 1 0
keras-jax 1 0
Additional details and impacted files
@@             Coverage Diff             @@
##           master   #19736       +/-   ##
===========================================
- Coverage   78.53%   56.30%   -22.24%     
===========================================
  Files         498      498               
  Lines       45753    45755        +2     
  Branches     8455     8456        +1     
===========================================
- Hits        35933    25762    -10171     
- Misses       8086    18402    +10316     
+ Partials     1734     1591      -143     
Flag Coverage Δ
keras 56.30% <0.00%> (-22.09%) :arrow_down:
keras-jax ?
keras-numpy 56.30% <0.00%> (-0.01%) :arrow_down:
keras-tensorflow ?
keras-torch ?

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 20 '24 08:05 codecov-commenter