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

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

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)

If still stuck let me know.

Regards
DP

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

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

Let me know if issue resolves or not.

Regards
DP

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.

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

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