Deep Neural Networks – Convert TensorFlow Classification Model and Release with OpenCV Python OpenCV v4.8.0

Original author Anastasia Murzova Compatibility OpenCV >= 4.5 Goals In this tutorial you will learn how to Get a frozen graph of a TensorFlow (TF) classification model Run the converted TensorFlow model using the OpenCV Python API Get evaluation results for TensorFlow and OpenCV DNN models We will discuss the above points using the MobileNet […]

: too many indices for tensor of dimension 3

Table of Contents Solve the problem that tensor with dimension 3 has too many indexes introduction wrong reason Solution 1. Check the number of indexes 2. Make sure the tensor dimensions are correct 3. Check data type 4. Try to reconstruct the tensor 5. Review documentation and reference materials in conclusion scene description Sample code […]

Deployment of yolov8 tensorrt model under Jetson Xavier NX (Jetpack5.1.2, CUDA11.4, Cudnn8.6.0, Tensorrt8.5.2)

Article directory Preface Jetson Xavier NX environment configuration 1. TensorRT-Alpha source code download 1. Source code download 2.File settings 2. Yolov8 model deployment 1. Export yolov8 onnx model 2. Use tensorrt to convert onnx files to trt files 3. Source code modification 4.Compile 5. Run Summarize refer to Foreword Records of the deployment process and […]

4 Tensorflow image recognition model (Part 1) data preprocessing

Previous article: 3 Detailed explanation of tensorflow model construction-CSDN blog This article begins by introducing the model for identifying cat and dog pictures. It has a lot of content and will be divided into multiple chapters. Model building is still the same process as before: Dataset preparation Data preprocessing Create model Set up loss function […]

ubuntu 20.04 + cuda-11.8 + cudnn-8.6+TensorRT-8.6

1. Install graphics card driver ubuntu20.04 + cuda10.0 + cudnn7.6.4_Who am I? ? Blog-CSDN Blog View supported driver versions: Check the driver information that can be configured by the local graphics card lu@host:/usr/local$ ubuntu-drivers devices == /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 == modalias : pci:v000010DEd000021C4sv000010DEsd000021C4bc03sc00i00 vendor: NVIDIA Corporation model: TU116 [GeForce GTX 1660 SUPER] driver: nvidia-driver-525-open-distro non-free driver: nvidia-driver-450-server […]

About pytorch tensor dimension conversion and tensor operations

About pytorch tensor dimension conversion list 1 tensor.view() 2 tensor.reshape() 3 tensor.squeeze() and tensor.unsqueeze() 3.1 tensor.squeeze() dimensionality reduction 3.2 tensor.unsqueeze(idx) dimensionality increase 4 tensor.permute() 5 torch.cat([a,b],dim) 6 torch.stack() 7 torch.chunk() and torch.split() 8 Multiplication operation with tensor 9 Addition operation with tensor 10 tensor.expand() 11 tensor.narrow(dim, start, len) 12 tensor.resize_() 13 tensor.repeat() 14 unbind() refer […]

Pytorch01-tensor

1.torch.Tensor: 1. Data type: Multidimensional matrix containing elements of a single data type 2. Conversion of tensor type: Convert python list or sequence data into Tensor, dtype is torch.FloatTensor torch.tensor() 3. Change torch.dtype and torch.device: Use to() method torch.ones([2, 3], dtype=torch.float64, device=’cuda:0′) # if use mps need to change to mps of device # tensor([[1., […]

Object detection using TensorFlow SSD network

Object detection using TensorFlow SSD network Table of Contents describe How does this example work? Process input graph Prepare data sampleUffSSD plugin Verify output TensorRT API layers and operations prerequisites Run the example Example –help option additional resources license Change log Known issues Description This example sampleUffSSD preprocesses the TensorFlow SSD network, uses TensorRT to […]

Solving ImportError: cannot import name adam from tensorflow.python.keras.optimizers

Table of Contents Solving ImportError: cannot import name adam from tensorflow.python.keras.optimizers Introduction wrong reason solution TensorFlow 1.x version TensorFlow 2.x version Update TensorFlow version in conclusion Introduction to Adam optimizer The principle of Adam optimizer Solving ImportError: cannot import name adam from tensorflow.python.keras.optimizers Introduction When using TensorFlow for deep learning, you often encounter some errors. […]