Skip to content

Commit

Permalink
Fixed setting a qp per tensor using the encoder parameter qp_per_tens…
Browse files Browse the repository at this point in the history
…or. The encoder crashed when using this parameter.
  • Loading branch information
phaase-hhi committed Jan 12, 2023
1 parent 7a98ad1 commit c7f9575
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ source env/bin/activate

**Note**: For further information on how to set up a virtual python environment (also on **Windows**) refer to https://docs.python.org/3/library/venv.html .

When successfully installed, the software outputs the line : "Successfully installed NNC-0.1.4"
When successfully installed, the software outputs the line : "Successfully installed NNC-0.1.5"

### Importing the main module

Expand Down
4 changes: 2 additions & 2 deletions nnc_core/approximator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,9 @@ def __init__(
else:
self.approx_info["qp"][x] = qp if model_info["parameter_type"][x] in nnc_core.nnr_model.W_TYPES else self.qp_other
if qp_per_tensor is not None:
assert type(qp_per_tensor) is dict(), "qp_per_tensor must be a dict!"
assert type(qp_per_tensor) is dict, "qp_per_tensor must be a dict!"
for x in approx_data["parameters"]:
approx_data["parameters"][x] = qp_per_tensor.get(x, approx_data["parameters"][x])
self.approx_info["qp"][x] = qp_per_tensor.get(x, self.approx_info["qp"][x])
if opt_qp:
self._modify_qp(approx_data, model_info)

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from setuptools.command.build_ext import build_ext
import setuptools

__version__ = '0.1.4'
__version__ = '0.1.5'


class get_pybind_include(object):
Expand Down

0 comments on commit c7f9575

Please sign in to comment.