Back to Tensorrtx

Googlenet

googlenet/README.md

latest1.1 KB
Original Source

Googlenet

Introduction

GoogLeNet (Inception v1) model architecture from Going Deeper with Convolutions. For model details, refer to code from torchvision, for generating .wts file, refer to pytorchx/googlenet

Usage

  1. use gen_wts.py to generate wts file.
bash
python3 gen_wts.py
  1. build C++ code
bash
pushd tensorrtx/googlenet
cmake -S . -B build -G Ninja --fresh
cmake --build build
  1. serialize wts model to engine file.
bash
./build/googlenet -s
  1. run inference
bash
./build/googlenet -i

output looks like:

bash
...
====
Execution time: 637us
-1.823, -0.9841, 0.6483, 0.7607, -0.4659, -1.407, -2.807, -1.175, -0.4034, -1.881, -1.267, -1.654, 0.7542, -1.777, -0.7118, -2.134, -1.542, 0.1852, -3.036, -0.5396, -0.1669,
====
prediction result:
Top: 0 idx: 285, logits: 9.9, label: Egyptian cat
Top: 1 idx: 281, logits: 8.304, label: tabby, tabby cat
Top: 2 idx: 282, logits: 6.859, label: tiger cat