analitics

Pages

Saturday, February 26, 2022

Python 3.7.12 : My colab tutorials - part 023.

NVIDIA announces TensorRT 8.2 and Integrations with PyTorch and TensorFlow on Dec 02, 2021.
This Torch-TensorRT is a high-performance deep learning inference optimizer and runtime that delivers low latency, high-throughput inference for AI applications. TensorRT is used across several industries including healthcare, automotive, manufacturing, internet/telecom services, financial services, and energy.
I tested today using my gavatar image on colab notebook with the GPU device.
Am prelucrat un cod sursa exemplu existent de pe internet cu o un model RESNET known as Deep Residual Learning for Image Recognition, see this website.
model = models.resnet50(pretrained=True).to("cuda")
I have a pretty good picture of the processing possibilities given for this topic and I can tell you today that this implementation of TensorRT is below my expectations.
However, there are some positive elements that can be used with this in the future.
The full exaemple and how can be used TensorRT with colab tool can be found on my GitHub repo with all colabs notebooks.

Tuesday, February 1, 2022

Python 3.10.0 : How to using wheels.

Wheels are the last component of the Python ecosystem that helps to make package installs easy.
Wheel and Egg are both packaging formats.
The Egg format was introduced by setuptools in 2004, whereas the Wheel format was introduced by PEP 427 in 2012.
You can use it easy with these commands:
C:\Python310>python.exe -m pip install wheel
Collecting wheel
  Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Installing collected packages: wheel
  WARNING: The script wheel.exe is installed in 'C:\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed wheel-0.37.1

C:\Python310>python.exe -m pip install --upgrade pip setuptools wheel
Requirement already satisfied: pip in c:\python310\lib\site-packages (21.3.1)
Collecting pip
  Downloading pip-22.0.2-py3-none-any.whl (2.1 MB)
     |████████████████████████████████| 2.1 MB 2.2 MB/s
Requirement already satisfied: setuptools in c:\python310\lib\site-packages (57.4.0)
Collecting setuptools
  Downloading setuptools-60.6.0-py3-none-any.whl (953 kB)
     |████████████████████████████████| 953 kB 6.8 MB/s
Requirement already satisfied: wheel in c:\python310\lib\site-packages (0.37.1)
Installing collected packages: setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 57.4.0
    Uninstalling setuptools-57.4.0:
      Successfully uninstalled setuptools-57.4.0
  Attempting uninstall: pip
    Found existing installation: pip 21.3.1
    Uninstalling pip-21.3.1:
      Successfully uninstalled pip-21.3.1
  WARNING: The scripts pip.exe, pip3.10.exe and pip3.exe are installed in 'C:\Python310\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-22.0.2 setuptools-60.6.0