I installed tensorflow 1.4.0 with pip3. (Windows)
I'm trying to use cv2.dnn.readNetFromTensorflow with a retrained Inception V3 graph.
Unfortunately it seems cv2 does not support retrained graphs so I went through transform graph.pb into one usable by cv2, but unfortunately I can't find no transform_graph in graph_transforms in tensorflow.
Should I install tensorflow differently?
You have to Build it first.
bazel build tensorflow/tools/graph_transforms:transform_graph
Note that it will not work if you're using a Opencv version below 3.3.1 and even than my graphs are not very accurate after loading.
Answer to edit:
yes that script has to be build with bazel and is not in your normal download.
Related
I want to use Tensorflow on GPU. So I install all the needed tool and installed as below-
CUDA-11.2
CUDNN-11.1
Anaconda-2020.11
Tensorflow-GPU-2.3.0
I tested that my cuda,cudnn is working using deviseQuery example.
But Tensorflow not used GPU. Then i find that version compatibility issue is possible so i innstalled CudaToolkit,cudnn using conda environment checking with version compatibility on Tensorflow website which is given below.
CUDA-10.2.89
CUDNN-7.6.5
Tensorflow-GPU-2.3.0
But after this try Tensorflow-GPU not used GPU,yet. so what i am doing now? Any steps or suggestion require.
The installation engine has a problem for tensorflow-gpu 2.3 in Anaconda on Windows 10.
Workaround is to explicitly specify the correct tensorflow build:
conda install tensorflow-gpu=2.3 tensorflow=2.3=mkl_py38h1fcfbd6_0
I want to run the project using Anaconda, TensorFlow 2.3, Keras 2.4.3 (CNN example). OS Windows 10.
I installed Visual Studio 2019 Community Edition, CUDA 10.1 and cudnn 8.0.5 for CUDA 10.1.
Using Anaconda I created an environment with TensorFlow (tensorflow-gpu didn't help), Keras, matplotlib, scikit-learn. I tried to run it on CPU but it takes a lot of time (20 minutes for just 1 epoch when there are 35).
I need to run it using GPU, but TensorFlow doesn't see my GPU device (GeForce GTX 1060). Can someone help me find the problem? I tried to solve the problem using this guide tensorflow but it didn't help me.
This works 100%, no need to install anything manually (cuda for example)
conda create --name tf_gpu tensorflow-gpu
Ok so I tried to install all the components into new anaconda environment. But instead of "conda install tensorflow-gpu" I decided to write "pip install tensorflow-gpu" and now it works via GPU...
Just a heads up, the Cudnn version you were trying to use was incompatible.
Listing Versions and compatible CUDA+Cudnn
You can go here and then scroll down to the bottom to see what versions of CUDA and Cudnn were used to build TensorFlow.
I'm quite new to Keras and Tensorflow, and I'd like to export my model to Javascript to be able to run it in a web browser. This worked great with WebDNN a year ago.
Today I updated my Tensorflow installation and ran the whole model again. Unfortunately, I'm now getting the error
NotImplementedError: WebDNN supports TensorFlow >=v1.2.0,<=v1.4.0 Currently, TensorFlow 1.13.1 is installed.
How can I "downgrade" my model data to the Tensorflow 1.4.0 format so that it runs with WebDNN?
Should I create a new Anaconda environment, install Tensorflow 1.4.0 there, and move the model weights to that environment? Or should I try to adapt the code of WebDNN so that it works with TensorFlow 1.13?
You can try pip uninstall tensorflow and then pip install tensorflow-gpu==1.4.0.
It is good practice to install your dependencies in separate environments, to avoid global pollution.
I recently found an article that indicates that the conventional methods for downloading python machine learning modules such as tensorflow and keras are not optimized for computers with a cpu. How can I configure tensorflow and keras to make it most compatible with my processor on MacOSX in python 2.7?
If it helps, I use pycharm to download most of my libraries and for my coding interface.
For any environment if you want to install tensorflow, you can simply run this command :
pip install tensorflow (for CPU, python2.7)
pip3 install tensorflow (for CPU, python3)
You need to mention externally if you want to install tensorflow with GPU like this:-
pip install --upgrade tensorflow-gpu
but for GPU you will need CUDA (NVDIA graphics) to run.
and very same way, you can install keras Where you dont have to pass keras-gpu externally while using command:-
pip install keras
I think what you read meant that tensorflow programs work much faster if your computer has a GPU. You need a Nvidia GPU in your computer to install tensorflow with GPU support on your Mac and as far as I know, after version 1.2 tensorflow no longer provides GPU support for MacOS
I am trying to use Keras to develop a Neural Network in Python, after managing to install on my Windows 10 Workstation Anaconda3 (with all its libraries: numpy, scikit-learn, pandas, SciPy and matplotlib), I realized to need TensorFlow or Theano, too.
After I failed intalling TensorFlow, I downloaded and was able to install Theano, but trying to import it from the Python prompt, I received the following:
WARNING: "g ++ not detected! Theano will be unable to execute optimized C implementations (for both CPU and GPU) and will default to Python implementations. Performance will be several degraded. To remove this warning, set Theano flags cxx to an empty string"
Hoping in this way to solve the problem, I downloaded the GNU compiler for C++ Cygwin64, but nothing has changed, at all! Acknowledge that this is really the right way to move forward, how should I access the "Theano flags cxx"?
first, its only performance issue to run theano without g++. it a warning and not exception when importing it.
BUT probably you want performance when using deep learning lib like keras so lets try fix the theano installation.
please follow the theano docs about installing theano on windows. you might want to clean previous installation of requirements.
to install the gcc follow this section which says:
Theano C code compiler currently requires a GCC installation. We have
used the build TDM GCC which is provided for both 32- and 64-bit
platforms...
download from here follow the installation instruction.
Tensorflow
I recommending working with tensorflow as keras recently changed the default backend from theano to tensorflow.
using anaconda and pip you should easily do pip install tensorflow and it will work.
actually today I just installed keras and tensorflow on windows 10 using anaconda by just running pip install keras tensorflow so I suggest you try fresh clean installation of anaconda and python and try this again.
please update if you succeed or having another issues installing theano / tensorflow / keras