[POT] Fix bug in classification sample (#19490)

* Fix bug in classification sample

* fix readme
This commit is contained in:
Liubov Talamanova 2023-08-30 12:18:44 +01:00 committed by GitHub
parent d84fa07841
commit b790458da6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 5 deletions

View File

@ -32,7 +32,7 @@ How to Run the Example
.. code-block:: sh .. code-block:: sh
python3 ./classification_example.py -m <PATH_TO_IR_XML> -a <IMAGENET_ANNOTATION_FILE> -d <IMAGES_DIR> python3 ./classification_sample.py -m <PATH_TO_IR_XML> -a <IMAGENET_ANNOTATION_FILE> -d <IMAGES_DIR>
Optional: you can specify .bin file of IR directly using the ``-w``, ``--weights`` options. Optional: you can specify .bin file of IR directly using the ``-w``, ``--weights`` options.

View File

@ -210,10 +210,9 @@ def optimize_model(args):
# Step 6: Execute the pipeline. # Step 6: Execute the pipeline.
compressed_model = pipeline.run(model) compressed_model = pipeline.run(model)
# Step 7 (Optional): Compress model weights quantized precision # Step 7: Compress model weights quantized precision
# in order to reduce the size of final .bin file. # in order to reduce the size of final .bin file.
if not args.keep_uncompressed_weights: compress_model_weights(compressed_model)
compress_model_weights(compressed_model)
return compressed_model, pipeline return compressed_model, pipeline