How to implement tensorflow with gpu in Windows 10? - python

There are many sources on configuring TensorFlow in Windows but none of them clearly states the steps and paths we should follow.
I have configured TensorFlow halfway but still I've missed few steps. Can anyone help with the whole configuration process?
I've used TensorFlow with gpu,
NVIDIA 950M, Windows 10, Python 3.5.2, CUDA nn8 v5.1
Glad even if someone could send me a link to complete process :)

The documentation in tensorflow.org has the complete process.

Related

how to run GPU on Mac OS Big Sur/Jupyter notebook

I am trying to create a GPU environment in Jupyter notebook to run CNN models but have had trouble. I am on MacOS (Big Sur) and was following the instructions from: https://www.techentice.com/how-to-make-jupyter-notebook-to-run-on-gpu/
First, to create a separate GPU environment in Jupyter understand that I need CUDA toolkit. However, found out that CUDA toolkit no longer supports Mac.
Second, understand that I have to download tensor flow GPU which apparently doesn't support MAC/python 3.7.
would be grateful for any help or advice please. essentially I just want to be able to run my code on GPU as CPU is way too slow for machine learning models. is there any way around this?

How to check if an NVIDIA GPU is available on my system?

Is there a simple way to check if an NVIDIA GPU is available on my system using only standard libraries? I've already seen other answers where they recommend using PyTorch or TensorFlow but that's not what I'm looking for. I'd like to know how to do this on both Windows and Linux. Thanks!
When you have Nvidia drivers installed, the command nvidia-smi outputs a neat table giving you information about your GPU, CUDA, and driver setup.
By checking whether or not this command is present, one can know whether or not an Nvidia GPU is present.
Do note that this code will only work if both an Nvidia GPU and appropriate drivers are installed.
This code should work on both Linux and Windows, and the only library it uses is subprocess, which is a standard library.
import subprocess
try:
subprocess.check_output('nvidia-smi')
print('Nvidia GPU detected!')
except Exception: # this command not being found can raise quite a few different errors depending on the configuration
print('No Nvidia GPU in system!')
Following code shows if cuda available. cuda is in contact with gpu
print(torch.cuda.is_available())
print(torch.backends.cudnn.enabled)

Keras stopped training despite using GPU memory

similarly to the topic below, keras stopped working.
tf.keras - Training on first epoch not progressing despite using GPU memory
I've a python 3.7 anaconda installation on windows
cuda 10.2 and cudnn installed
3080 GPU
keras 2.3.1
TF 1.4
A few days ago everything was running perfectly. Then after installing pytorch keras stopped working. The same script I was training before now get stuck on the first epoch. No errors are displayed when running model.fit (verbose 2). Simply the whole memory is full (even using a very small dataset) and the training is not advancing.
As additional information pytorch displayed an error about the impossibility to use cuda.
I've tried to format the whole PC (factory reset) and the issue is still happening.
I'm out of ideas. Any suggestion would be more then welcome.
Thanks!
I really think that factory reset of the whole PC was really not necessary. I would suggest creating two conda virtual environments, one with Tensorflow and the other with PyTorch. Conda virtual environments are a really useful, they keep things separated and this might be really useful for your application. Here there is the Anaconda official reference explaining how to manage the environments.

Warning with CUDF/Python: "User Warning: No NVIDIA GPU detected"

I am having some difficulty running code with the cudf and dask_cudf modules in python.
I am working on Jupyter Labs through Anaconda. I have been able to correctly install my nvidia-gpu driver, cudf (through rapidsai), and cuda. Only, when I go to import cudf in python using import cudf, I get an error reading: "home/lib/python3.7/site-packages/cudf/utils/gpu_utils.py:120: UserWarning: No NVIDIA GPU detected. Warnings.warn("No NVIDIA GPU detected")
My environment:
Linux: RHEL8
Python: 3.7.7
Cuda: 10.2
Nvidia Driver: 390.138
CUDF/Dask_CUDF: 0.13 through rapidsai
I am trying to load and manipulate datasets with data in the hundreds of thousands to millions of items, so I really need the cudf/dask_cudf utility to maximize my time.
When I run nvidia-smi in the terminal, everything looks fine and the persistence mode is on. I have searched all over the internet for a solution with no great ideas. Any help would be appreciated.
Based on the conversations you're having with Robert, it seems that your GPU's architecture being a few generations outside of what RAPIDS will work with is the issue. Thanks Robert for working with Maggie to figure that out!
I wouldn't try to force RAPIDS to work on Kepler when there are so many alternative ways to provision a GPU - even free options for trial purposes!
If you are still interested in trying out RAPIDS and only need a single GPU, please look at our Google Colab notebooks and set up script OR app.blazingsql.com. They are shared or extra instances, with Colab allowing you more customization of your workspace if you need to install more packages and blazing having the fastest "get up and running" time.
If you feel that you need more than one GPU, you move to the paid realm and can provision it with any major cloud provider, install RHEL version of your choice (we only officially support RHEL 7, though).
Does that help you?

Training Faster R-CNN or Mask R-CNN with Windows Anaconda prerequisites in example

I am not experienced user in Python. I have been working with R for the years, but keras implemented there doesn't provide any reproducible examples of working with object detection architectures like Faster R-CNN. I found a lot of examples that harness Python, but I faced troubles just even run some examples from the first lines: it is all built on the downloading through pip operator (in terminal in Ubuntu or orther Linux OS), while analogues for Windows conda users are not provided.
That is, I even don't know how to install module mrcnn from the one example on my Windows machine. Should I suffer further? I have had a very bad experience trying launch compatible versions of CUDA, cudNN and other things for my keras on Ubuntu. And now I am returning to the Windows, but... keras in R still doesn't provide any suggestions for object detection techniques.
Does somebody have links for Faster or Mask R-CNN implementation with conda examples for downloading prerequisites? My googling is failed here. Or in R-keras.

Categories