Skip to content

Conversation

@Thakor-Yashpal
Copy link

@Thakor-Yashpal Thakor-Yashpal commented Nov 4, 2025

Changes

  • Modified nncf/quantization/algorithms/fast_bias_correction/openvino_backend.py.
  • Updated the create_input_data method to add a specific check for 1D input shapes (i.e., len(shape) == 1).
  • When a 1D model is detected, the function now bypasses the per-channel loop and directly uses the single mean tensor from the data list.

Reason for changes

The create_input_data method was looping based on the channel dimension size (3) but should have been based on the statistics list size (1)

Related tickets

Closes the feature request: "Currently FastBiasCorrection algorithm does not support models without the batch dimension"
#3481

Tests

Verified the fix by running the reproducer command provided in the issue, which now passes:

python -m pytest tests/openvino/native/test_fast_bias_correction.py -k OneDimMM

@Thakor-Yashpal Thakor-Yashpal requested a review from a team as a code owner November 4, 2025 23:24
@MaximProshin
Copy link
Collaborator

@daniil-lyakhov , please take a look

Copy link
Collaborator

@daniil-lyakhov daniil-lyakhov left a comment

Choose a reason for hiding this comment

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

@Thakor-Yashpal, thank you for the contribution! Please apply the comments and add the test reproducer to the PR

.gitignore Outdated
.installed.cfg
*.egg

my_project_env
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
my_project_env

# limitations under the License.

__version__ = "2.19.0"
__version__ = "2.19.0.dev0+1489448a3dirty"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
__version__ = "2.19.0.dev0+1489448a3dirty"
__version__ = "2.19.0"

Comment on lines 129 to 132
# Copyright (c) 2025 Intel Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Copy link
Collaborator

Choose a reason for hiding this comment

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

Looks like some issues with the code merging, there are two different classes with the same name in the PR

@github-actions github-actions bot added the NNCF OpenVINO Pull requests that updates NNCF OpenVINO label Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

NNCF OpenVINO Pull requests that updates NNCF OpenVINO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants