# TensorFlow 2 support

**URL:** <https://forums.developer.nvidia.com/t/tensorflow-2-support/108127>\
**Category:** Triton Inference Server (archived)\
**Created:** [November 27, 2019, 6:27pm UTC](https://forums.developer.nvidia.com/t/tensorflow-2-support/108127 "2019-11-27T18:27:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bayandin](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/bayandin/32/11938_2.png) [@bayandin](https://forums.developer.nvidia.com/u/bayandin)\
**Post date:** [November 27, 2019, 6:27pm UTC](https://forums.developer.nvidia.com/t/tensorflow-2-support/108127/1 "2019-11-27T18:27:44Z")

</div>

Hello,

Is there any ETA for add supporting of TensorFlow 2 to TRTIS?  
As far as I can see Nvidia container with TensorFlow 2 was released this month, but TRTIS has continued to use the previous version of TensorFlow.

Thanks!

---

<div class="post-metadata">

**Author:** ![devin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@devin](https://forums.developer.nvidia.com/u/devin)\
**Post date:** [July 15, 2020, 5:54pm UTC](https://forums.developer.nvidia.com/t/tensorflow-2-support/108127/2 "2020-07-15T17:54:42Z")

</div>

Hi, I wanted to revive this thread because I am also interested in adding TensorFlow 2 support to Triton.

I am trying to deploy a TensorFlow graphdef model on Triton 2.0.0. I have noticed that inference times in my local dev environment (not on Triton) are much slower when the model is exported using TensorFlow 1.15.2 instead of 2.2.0. When I tested both exports on Triton, I noticed that the TF2.2.0 export loses its performance advantage and is equally as slow as the TF1.15.2 export. My assumption is that TF2 is responsible for these inference time improvements and that allowing Triton to serve TF2 models would result in better inference times.

I tried building a custom image from the base [Dockerfile](https://github.com/NVIDIA/triton-inference-server/blob/v2.0.0/Dockerfile#L33) with the TensorFlow image arg updated.

Here is what I set the arg to (replaced `tf1` with `tf2` after seeing it was an option in the tf [docs](https://docs.nvidia.com/deeplearning/frameworks/tensorflow-release-notes/running.html#running)):

```auto
ARG TENSORFLOW_IMAGE=nvcr.io/nvidia/tensorflow:20.06-tf2-py3

```

But it looks like the TF2 TRTIS lib doesn’t exist because I get this copy failure:

```auto
Step 39/124 : COPY --from=trtserver_tf /usr/local/lib/tensorflow/libtensorflow_trtis.so.1 /opt/tritonserver/lib/tensorflow/
COPY failed: stat /var/lib/docker/aufs/mnt/92c0ea40c2eebfb2675728f6de9f6123c63d1dc1a93fb6455e28905720d95d53/usr/local/lib/tensorflow/libtensorflow_trtis.so.1: no such file or directory

```

Is it possible to build Triton so that it can serve models with TensorFlow 2?

Thanks

---

<div class="post-metadata">

**Author:** ![devin](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@devin](https://forums.developer.nvidia.com/u/devin)\
**Post date:** [July 16, 2020, 9:25pm UTC](https://forums.developer.nvidia.com/t/tensorflow-2-support/108127/3 "2020-07-16T21:25:42Z")

</div>

answered here:  
[https://github.com/NVIDIA/triton-inference-server/issues/1804#issuecomment-659679254](https://github.com/NVIDIA/triton-inference-server/issues/1804#issuecomment-659679254)
