can i install both tensorflow and tensorflow lite? - tensorflow

Can I install both Tensor-Flow and Tensor-Flow lite ? I using Raspberry Pi 4, Python3, cp37, version is armv7l. Tensor-Flow version = 2.1
I have a folder for Tensor-Flow but when I run the program, the speed is very slow, detection sometime incorrect. My Raspberry Pi do not have any GPU, Is it possible to install TensorFlow Lite? Will it corrupted of the software?

Related

Tensorflow Loss function is NAN when using GPU

I am trying to train custom object detection model using pre-trained model from Tensorflow1 Model ZOO.
I am using model ssd_mobilenet_v2_coco_2018_03_29
I created suitable environment for training following this tutorial :https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/tensorflow-1.14/training.html
The thing is, when I tried to train the model using tensorflow-gpu==1.14.0 I always got the error saying Model diverged with loss = NaN.
Then I tried to uninstall tensorflow-gpu==1.14.0 and install tensorflow==1.14.0 (so it did not use my GPU) and all of sudden it started to work !
I have no idea how is that possible...
Command I am using -
python model_main.py --alsologtostderr --model_dir=models\ssd_mobilenet_v2_coco_2018_03_29\export --pipeline_config_path=models\ssd_mobilenet_v2_coco_2018_03_29\pipeline.config --num_train_steps=2000
Python version is 3.7
OS is Windows 10
My Graphics Card is Nvidia GeForce RTX3050, I used CUDA v10.0 and cuDNN v7.4.1
Any ideas ?
This is because RTX30's don't support cuda 10. If you need tf v1 (1.15) you can install nvidia's tensorflow (1.15) that can run on cuda 11.
pip install nvidia-pyindex
pip install nvidia-tensorflow[horovod]
Note: Only supports Python 3.6 or 3.8 [Not 3.7]
https://developer.nvidia.com/blog/accelerating-tensorflow-on-a100-gpus/

Google Colab Tensorflow 1.15 GPU

Does anyone know if Google Colab's GPUs are only compatible with tensorflow versions 2.x? I'm trying to run tensorflow 1 code, so I am pip installing tensorflow 1.15, also pip installing tensorflow 1.15 gpu, and changing my notebook settings to enable GPU, however I don't seem to see the GPU speed up effects?

How to load keras model onto Raspberry Pi

I cannot find how to use keras model that I've trained on my PC to load onto my Raspberry Pi 3.
How can I move it from the PC to the Raspberry Pi?
Tensorflow support Raspberry Pi officially since v1.9.
Just:
sudo apt install libatlas-base-dev
pip3 install tensorflow
Then you may upload your python code along with .h5 model to the device to run.

xgboost install on tensorflow GPU support

I already install tensorflow GPU support.
try install xgboost on tensorflow by
'conda install -c anaconda py-xgboost'
I wonder the xgboost what GPU support or not.
I don't install https://xgboost.readthedocs.io/en/latest/build.html#building-with-gpu-support
only tensorflow GPU support.
Do i need install xgboost Gpu support or not??? if i want use xgboost with GPU support
You can check if your xgboost is compiled for gpu, just try to run some model with tree_method='gpu_hist' or another gpu method (here).
If it would raise an error that xgboost's not compiled for gpu, then reinstall it following the instructions that you have found.
Probably, you don't need install CUDA (if you have successfully installed tensorflow-gpu and it works, then CUDA must be installed already), but you definitely should build gpu-supported xgboost.

Can I implement deep learning models in my laptop with intel hd graphics

I am currently doing a project on deep learning for my masters degree. I wanted to install keras library, so when I started installing Theano and tensorflow i saw that i have to install CUDA. But my laptop comes with intel hd graphics. So my question is will it work if i install them anyway.
Thanks
Edit:
As of now, you can directly use OpenCL based clDNN (https://github.com/01org/clDNN) instead of using OpenVX, in order to perform Deep Learning inference on Intel Graphics. You will have to do the training on a powerful GPU like Nvidia or AMD and use the pre-trained model and use it in clDNN.
You can start using Intel's Computer Vision SDK (https://software.intel.com/en-us/computer-vision-sdk) in order to write Deep Learning Applications using OpenCV or OpenVX.
OpenVX (https://www.khronos.org/openvx/) programming model allows you to write simple Neural Network pipelines using the following SPEC (https://www.khronos.org/registry/OpenVX/extensions/neural_network/html/)
Alternatively you can use Model Optimizer that converts Caffe/TensorFlow model into OpenVX, and you can accelerate the OpenVX Neural Network graph on Intel Integrated HD Graphics.
Hope it helps.
You can install and use keras without cuda, but you can't get gpu accelerating with intel hd graphics.
If you use Theano as keras' backend, first install Theano:
# for python2
pip install theano
# for python3
pip3 install theano
Then set ~/.theanorc file like this:
[global]
floatX = float32
device = cpu
allow_gc = True
[blas]
ldflags = -lopenblas
If you use TensorFlow as keras' backend, just install the CPU version of TensorFlow.
# for python2.7
pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0-cp27-none-linux_x86_64.whl
# for python3.4
pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0-cp34-cp34m-linux_x86_64.whl
# for python3.5
pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.12.0-cp35-cp35m-linux_x86_64.whl
Then install keras:
# for python2
pip install keras
# for python3
pip3 install keras
Their is a PlaidML with that you train deep learning model on Intel and AMD gpu.