# Converting Caffe model to TensorRT

**URL:** <https://forums.developer.nvidia.com/t/converting-caffe-model-to-tensorrt/60460>\
**Category:** Jetson TX2\
**Created:** [April 20, 2018, 12:04am UTC](https://forums.developer.nvidia.com/t/converting-caffe-model-to-tensorrt/60460 "2018-04-20T00:04:22Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![dusty\_nv](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/dusty_nv/32/14043_2.png) [@dusty\_nv](https://forums.developer.nvidia.com/u/dusty_nv)\
**Post date:** [April 24, 2018, 12:20am UTC](https://forums.developer.nvidia.com/t/converting-caffe-model-to-tensorrt/60460/5 "2018-04-24T00:20:12Z")

</div>

> [@](#):
>
> My application is super-resolution, which takes an input image and outputs another bigger image. There are no bounding boxes or image labels involved. Thus, my understanding is that the precompiled imagenet-console (your example above), detectnet-console, and segnet-console would not apply, and I would have to make these files myself. Is this correct?

Hi rsandler00, yes you are correct, you would want to modify one of the above to expect your respective input and output blobs. imageNet, detectNet, and segNet use the generic [tensorNet](https://github.com/dusty-nv/jetson-inference/blob/master/tensorNet.h) class underneath, which provides the caffemodel loading and accepts the input and output blob names. Then it is up to the child classes to interpret the output blobs (in your case, the superresolution image).

> [@](#):
>
> I looked at the TensorRT developer guide (the link provided above), and I still could not understand how to actually convert a caffe model to tensorRT. The 1 example, the MNIST example in section 3.2 only had bits and pieces of code. Is there a git file where this example is shown in full, and the associated workflow?

Here is the code that loads a generic caffemodel into TensorRT:  
[https://github.com/dusty-nv/jetson-inference/blob/e12e6e64365fed83e255800382e593bf7e1b1b1a/tensorNet.cpp#L213](https://github.com/dusty-nv/jetson-inference/blob/e12e6e64365fed83e255800382e593bf7e1b1b1a/tensorNet.cpp#L213)

---

_[View the full topic](https://forums.developer.nvidia.com/t/converting-caffe-model-to-tensorrt/60460)._
