create_inference_graph does not take input_saved_model_dirs and input_saved_model_tags as parameters


I am using Jetson TX2 with JetPack 3.3, Tensorflow 1.11.0, libnvinfer 4.1.3, Cuda 9.0.
I am trying to create_inference_graph using my saved keras model using the trt.create_inference_graph function according to this tutorial:
I have imported trt as:
import tensorflow.contrib.tensorrt as trt

As per most of the imports, “from tensorflow.python.compiler.tensorrt import trt_convert” is not available and hence I use “import tensorflow.contrib.tensorrt as trt”

However, I get an error saying: “TypeError: create_inference_graph() got an unexpected keyword argument ‘input_saved_model_dir’”

When I check the located at":/usr/local/lib/python3.5/dist-packages/tensorflow/contrib/tensorrt/python/, the function definition itself does not take the “input_saved_model_dir”, “input_saved_model_tags” parameters as input: The function from the is as below:

def create_inference_graph(input_graph_def,
max_workspace_size_bytes=2 << 20,

This definition is different the one found here:

I am not sure what I am missing here. Is it that the version of tensorrt is not updated?

Appreciate some help!


The API has changed from TensorRT 5.0.
I’m not sure if it is compatible to the TensorFlow package you used.

Is any special reason to use JetPack3.3?
We have a newer JetPack4.2 to support Jetson TX2.
It’s recommended to give it a try.


I tried installing the newer JetPack 4.2 but the installations were not going through the GUI. I figured the .run installer was much easier (Although it had its own issues, but still I could move ahead with it.)
From what you are saying I might have to flash a new jetpack version. Do I have to uninstall the older version in some way? Is there a .run installer available for JetPack 4.2 too?

So I tried my luck again with JetPack 4.2. This time I achieved better success than the last time, however there are still some issues:

  1. While downloading and installing on Host (Ubuntu 16.04) the installation fails for CUDA Cross Compiler with error: Check the orange underlined line (deb [arch=amd64] xenial multiverse)

15:35:04 ERROR : CUDA Cross Compile Package on Host : E: Failed to fetch 404 Not Found [IP: 80]
15:35:05 ERROR : CUDA Cross Compile Package on Host : E: Unable to correct problems, you have held broken packages.
15:35:05 ERROR : CUDA Cross Compile Package on Host : NV_CUDA_HOST_CROSS_COMP apt install failed
15:35:05 ERROR : CUDA Cross Compile Package on Host : command terminated with error

My source.list located at /etc/apt looks like this:

deb cdrom:[Ubuntu 16.04.5 LTS Xenial Xerus - Release amd64 (20180731)]/ xenial main restricted

See for how to upgrade to

newer versions of the distribution.

deb xenial main restricted

deb-src xenial main restricted

Major bug fix updates produced after the final release of the


deb xenial-updates main restricted

deb-src xenial-updates main restricted

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

team. Also, please note that software in universe WILL NOT receive any

review or updates from the Ubuntu security team.

deb xenial universe

deb-src xenial universe

deb xenial-updates universe

deb-src xenial-updates universe

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

team, and may not be under a free licence. Please satisfy yourself as to

your rights to use the software. Also, please note that software in

multiverse WILL NOT receive any review or updates from the Ubuntu

security team.

deb [arch=amd64] xenial multiverse

deb-src xenial multiverse

deb xenial-updates multiverse

deb-src xenial-updates multiverse

N.B. software from this repository may not have been tested as

extensively as that contained in the main release, although it includes

newer versions of some applications which may provide useful features.

Also, please note that software in backports WILL NOT receive any review

or updates from the Ubuntu security team.

deb xenial-backports main restricted universe multiverse

deb-src xenial-backports main restricted universe multiverse

Uncomment the following two lines to add software from Canonical’s

‘partner’ repository.

This software is not part of Ubuntu, but is offered by Canonical and the

respective vendors as a service to Ubuntu users.

deb xenial partner

deb-src xenial partner

deb xenial-security main restricted

deb-src xenial-security main restricted

deb xenial-security universe

deb-src xenial-security universe

deb xenial-security multiverse

deb-src xenial-security multiverse

However target installation and flashing completes successfully.
2. When I see the target screen, I cannot find any installed files and folders. Like tegra_multimedia_api, visionworks samples, etc,. which I found when I installed jetpack 3.3 successfully.

I am not sure where I am going wrong. Really appreciate your help!
Thank you!


It looks like there is some issue in installing the package on the host.
This is related to GPU card, GPU driver, CUDA, Ubuntu version, … on the host, which is pretty complicated.

To get JetPack4.2, you can just uncheck the host item and try it again.


Hello AastaLL,

JetPack 4.2 worked well. I had issues with CUDA Compiler on host, but target flashed successfully. I was not able to find the tegra_multimedia_api and other CUDA samples in the Home directory (JetPack 3.3 installed these in the Home directory, so when I didn’t see the particular folders mentioned above in the Home directory I thought something might have gone wrong). But later found them here: /usr/src/

Thank you!