# Failure to load the inference.so custom c++ tensorflow ops. This error is likely caused the version of TensorFlow and TensorFlow Decision Forests are not compatible

**URL:** <https://community.deeplearning.ai/t/failure-to-load-the-inference-so-custom-c-tensorflow-ops-this-error-is-likely-caused-the-version-of-tensorflow-and-tensorflow-decision-forests-are-not-compatible/533833>\
**Category:** Browser-based Models with TensorFlow.js\
**Tags:** week-module-3\
**Created:** [January 3, 2024, 6:05am UTC](https://community.deeplearning.ai/t/failure-to-load-the-inference-so-custom-c-tensorflow-ops-this-error-is-likely-caused-the-version-of-tensorflow-and-tensorflow-decision-forests-are-not-compatible/533833 "2024-01-03T06:05:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kesavan\_Ramalingam](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@Kesavan\_Ramalingam](https://community.deeplearning.ai/u/Kesavan_Ramalingam)\
**Post date:** [January 3, 2024, 6:05am UTC](https://community.deeplearning.ai/t/failure-to-load-the-inference-so-custom-c-tensorflow-ops-this-error-is-likely-caused-the-version-of-tensorflow-and-tensorflow-decision-forests-are-not-compatible/533833/1 "2024-01-03T06:05:33Z")

</div>

I have installed the latest TensoflowJS versions as below

- tensorflowjs==4.15.0
- tensorflow==2.15.0
- tensorflow-decision-forests==1.8.1

While converting my saved model which is trained on tensorflow 2.13.0 to Json model facing an exception as

_ **Failure to load the inference.so custom c++ tensorflow ops. This error is likely caused the version of TensorFlow and TensorFlow Decision Forests are not compatible.** _

Tried downgrading the version but TensorFlow Decision Forests is compatible only with Tensoflow 2.15.0

Also couldn’t able to import tensorflowjs as tfjs facing the same exception

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [January 3, 2024, 10:13am UTC](https://community.deeplearning.ai/t/failure-to-load-the-inference-so-custom-c-tensorflow-ops-this-error-is-likely-caused-the-version-of-tensorflow-and-tensorflow-decision-forests-are-not-compatible/533833/2 "2024-01-03T10:13:14Z")

</div>

Hello @Kesavan_Ramalingam,

The issue is relate to your problem can be addressed by pip installing the closest version of tensorflow. Kindly refer the below thread (also there are many similar thread with the same issue, you can search them using search tool by tensorflowjs version issue)

> [@Error installing tensorflow 2.2 on Colab as well as Anaconda](https://community.deeplearning.ai/t/error-installing-tensorflow-2-2-on-colab-as-well-as-anaconda/287783/21):
>
> @Osama_Saad_Farouk, try installing tensorflowjs before the tensorflow modifications; conda create -n tf210 tensorflow=2.1.0 python=3.7 conda activate tf210 pip install tensorflowjs==2.0.0 pip install tensorflow-intel==0.0.1 pip install tensorflow-cpu==2.1.0 pip install tensorflow-estimator==2.1.0rc0 pip install tensorflow==2.2.0 Then remember to install matplotlib as well, and open jupyter lab. I would recommend installing jupyter lab through the anaconda prompt. Here, you select tf210 from t…

If still stuck let me know.

Regards  
DP

---

<div class="post-metadata">

**Author:** ![Kesavan\_Ramalingam](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@Kesavan\_Ramalingam](https://community.deeplearning.ai/u/Kesavan_Ramalingam)\
**Post date:** [January 3, 2024, 10:43am UTC](https://community.deeplearning.ai/t/failure-to-load-the-inference-so-custom-c-tensorflow-ops-this-error-is-likely-caused-the-version-of-tensorflow-and-tensorflow-decision-forests-are-not-compatible/533833/3 "2024-01-03T10:43:43Z")

</div>

Thanks for your reply, I still facing issue on importing TensorflowJs

I don’t use conda distribution for venv creation, i use python venv, and followed the same instructions in the thread

 ![image](https://global.discourse-cdn.com/dlai/original/3X/5/c/5c5c7d9235e2de622fc2aad4026f23a4989c0773.png)

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [January 3, 2024, 10:47am UTC](https://community.deeplearning.ai/t/failure-to-load-the-inference-so-custom-c-tensorflow-ops-this-error-is-likely-caused-the-version-of-tensorflow-and-tensorflow-decision-forests-are-not-compatible/533833/4 "2024-01-03T10:47:31Z")

</div>

Hello @Kesavan_Ramalingam,

Did you use the search tool for the issue you are facing, there are so many threads related to your issue, probably one of them can address.

Try searching with specificity as tensorflow version issue Tensorflowjs.

Based on the error shared now by you it looks version issue, check the below link

> [@Tensorflow and tensorflowjs incompatibility](https://community.deeplearning.ai/t/tensorflow-and-tensorflowjs-incompatibility/231795/3):
>
> Okay, thank you for your response. For anyone else reading this thread to find the solution, please downgrade the version of tensorflowjs to something close to the version of tensorflow. It worked for me.

Let me know if issue resolves or not.

Regards  
DP

---

<div class="post-metadata">

**Author:** ![Kesavan\_Ramalingam](https://avatars.discourse-cdn.com/v4/letter/k/ccd318/32.png) [@Kesavan\_Ramalingam](https://community.deeplearning.ai/u/Kesavan_Ramalingam)\
**Post date:** [January 3, 2024, 12:15pm UTC](https://community.deeplearning.ai/t/failure-to-load-the-inference-so-custom-c-tensorflow-ops-this-error-is-likely-caused-the-version-of-tensorflow-and-tensorflow-decision-forests-are-not-compatible/533833/5 "2024-01-03T12:15:56Z")

</div>

Thank you for your responses, I could be able to figure that out. Used the following versions below.

- tensorflow==2.12.0
- tensorflow-cpu==2.12.0
- tensorflow-intel==2.12.0
- tensorflowjs==2.0.0

I was wondering these versions are bit far from current versions. Any thoughts here would be helpful.

---

<div class="post-metadata">

**Author:** ![Deepti\_Prasad](https://sea1.discourse-cdn.com/dlai/user_avatar/community.deeplearning.ai/deepti_prasad/32/165831_2.png) [@Deepti\_Prasad](https://community.deeplearning.ai/u/Deepti_Prasad)\
**Post date:** [January 3, 2024, 12:25pm UTC](https://community.deeplearning.ai/t/failure-to-load-the-inference-so-custom-c-tensorflow-ops-this-error-is-likely-caused-the-version-of-tensorflow-and-tensorflow-decision-forests-are-not-compatible/533833/6 "2024-01-03T12:25:17Z")

</div>

Yes the version do not match so creating the issue. The version for the assignment needs to use tensorflowjs 2.0

> [@Kesavan\_Ramalingam](#):
>
> I was wondering these versions are bit far from current versions. Any thoughts here would be helpful.

Some of the assignment when created had different tensorflow when programmed and now tensorflow package has newer version creating this issue. One can always address by trying to match the version of tensorflow.

Regards  
DP
