Tensorflow and Torch on the same environment
I am working on a goat detection problem. The main model identifies &quot;goat&quot; (single class) on an image and each goat then cropped from the original image. The cropped image then passes through a tensorflow model (trained tensorflow.keras.applications.InceptionV3) to find the current posture of the goat (sitting and standing - two classes).
The version of the torch should be 1.7+ and I am trying to use any version of the tensorflow (1.15.1/1.13.0 preferred). If I install tensorflow while torch is already installed, both tensorflow and torch disappear from the environment (pip freeze). Are there any compatible versions out there? Any specific version of TensorFlow and torch can be on the same environment?
Here are the commands -
conda create -n tst2 python=3.7
conda activate tst2

# install torch 1.7 gpu with cuda 10.1
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=10.1 -c pytorch

if I import torch, it works fine.
Then I Installed tensorflow 2.1.0 gpu
conda install -c anaconda tensorflow-gpu

Now, I can import tensorflow but no torch
&gt;&gt;&gt; import tensorflow
2021-05-02 17:47:23.158416: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library cudart64_101.dll
&gt;&gt;&gt; import torch
Traceback (most recent call last):
  File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;
ModuleNotFoundError: No module named 'torch'


Install tensorflow-gpu=2.6.0 and PyTorch with cudatoolkit=11.3 and its working fine with anaconda.
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
conda install tensorflow-gpu

