Skip to content
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

Fix Keras3 Issues in TF 2.16.1 for 3.0 new API #1669

Merged
merged 10 commits into from
Mar 13, 2024
Merged

Conversation

zehao-intel
Copy link
Contributor

@zehao-intel zehao-intel commented Mar 13, 2024

Type of Change

bug fix

Description

There are multiple issues caused by Keras3 changes in tf2.16.1.
This PR is to fix them.

  • Conv related base layer importing issue.
  • The call method should be adapted with the new implementation of base layers.
  • Saving format is changed for Keras models.
  • The compute_output_shape method is required in custom layer class.
  • The batch_normalization layer is removed in Keras 3.

How has this PR been tested?

UT

Dependency Change?

NO

Copy link

github-actions bot commented Mar 13, 2024

⛈️ Required checks status: Has failure 🔴

Warning
If you do not have the access to re-run the Probot, please contact XuehaoSun for help. If you push a new commit, all of the workflow will be re-triggered.

Groups summary

🟢 Code Scan Tests workflow
Check ID Status Error details
Code-Scan success
Code-Scan (Bandit Code Scan Bandit) success
Code-Scan (DocStyle Code Scan DocStyle) success
Code-Scan (Pylint Code Scan Pylint) success

These checks are required after the changes to neural_compressor/tensorflow/keras/layers/conv2d.py, neural_compressor/tensorflow/keras/layers/depthwise_conv2d.py, neural_compressor/tensorflow/keras/layers/quantizer.py, neural_compressor/tensorflow/keras/layers/separable_conv2d.py, neural_compressor/tensorflow/utils/model_wrappers.py.

🔴 Unit Tests 3x-TensorFlow workflow
Check ID Status Error details
UT-3x-TensorFlow failure
UT-3x-TensorFlow (Coverage Compare CollectDatafiles) no_status
UT-3x-TensorFlow (Unit Test 3x TensorFlow Unit Test 3x TensorFlow) success
UT-3x-TensorFlow (Unit Test 3x TensorFlow baseline Unit Test 3x TensorFlow baseline) failure download

These checks are required after the changes to neural_compressor/tensorflow/keras/layers/conv2d.py, neural_compressor/tensorflow/keras/layers/depthwise_conv2d.py, neural_compressor/tensorflow/keras/layers/quantizer.py, neural_compressor/tensorflow/keras/layers/separable_conv2d.py, neural_compressor/tensorflow/utils/model_wrappers.py, test/3x/tensorflow/keras/test_config.py, test/3x/tensorflow/quantization/test_smooth_quant.py, test/3x/tensorflow/test_autotune.py.


Thank you for your contribution! 💜

Note
This comment is automatically generated and updates for 360 minutes every 180 seconds. If you have any other questions, contact chensuyue or XuehaoSun for help.

@zehao-intel zehao-intel changed the title Fix Keras Conv Import Issue in TF 2.16.1 Fix Keras3 Issues in TF 2.16.1 for 3.0 new API Mar 13, 2024
@chensuyue chensuyue merged commit 047560f into master Mar 13, 2024
18 of 21 checks passed
@chensuyue chensuyue deleted the zehao/keras_conv branch March 13, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants