Skip to content

added changes to support numpy.log1p op #21050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions keras/src/backend/openvino/excluded_concrete_tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ NumpyDtypeTest::test_isfinite
NumpyDtypeTest::test_isinf
NumpyDtypeTest::test_isnan
NumpyDtypeTest::test_linspace
NumpyDtypeTest::test_log1p
NumpyDtypeTest::test_logaddexp
NumpyDtypeTest::test_log10

NumpyDtypeTest::test_log
Comment on lines -36 to +38
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not correct. remove lines only corresponding to log1p

NumpyDtypeTest::test_logspace
NumpyDtypeTest::test_matmul_
NumpyDtypeTest::test_max
Expand Down
5 changes: 4 additions & 1 deletion keras/src/backend/openvino/numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,10 @@ def log10(x):


def log1p(x):
raise NotImplementedError("`log1p` is not supported with openvino backend")
x=get_ov_output(x)
one=ov_opset.constant(1.0,dtype=x.dtype)
return OpenVINOKerasTensor(ov_opset.log(ov_opset.add(x,one)).output(0))



def log2(x):
Expand Down