tensorboard stuck when executed at command prompt - python

System information
Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10 Pro 1703
TensorFlow installed from (source or binary): install binary with GPU version by pip based on Python 3.5.2
TensorFlow version (use command below):('1.3.0')
Python version: 3.5.2
Bazel version (if compiling from source):none
CUDA/cuDNN version:cuda v8.0/cuDNN v6,0
GPU model and memory:GeForce GTX 1080 Ti 11GB
Describe the problem
I am trying to open TensorBoard after running mnist_with_summaries.py source code from the TensorBoard tutorials (https://github.com/tensorflow/tensorflow/blob/r1.3/tensorflow/examples/tutorials/mnist/mnist_with_summaries.py). After running I have got the logs folder. However,
After I run tensorboard --logdir=/tmp/tensorflow/mnist in cmd, it stuck and did not showing anything else. I try to use tensorboard --logdir=/tmp/tensorflow/mnist --debug and have the same result. Anyone know what I did wrong?

There is a github issue filed for this: https://github.com/tensorflow/tensorflow/issues/12693

Related

ImportError: Could not load dynamic library 'cudart64_110.dll' [duplicate]

This question already has answers here:
Fix not load dynamic library for Tensorflow GPU
(5 answers)
Closed 1 year ago.
I was originally running Tensorflow using PyCharm.
In PyCharm, the same phrase as the title did not appear.
But after I switched to VS Code and installed Python extension,
When I write and execute import tensorflow as tf, the error like the title appears repeatedly.
ImportError: Could not load dynamic library 'cudart64_110.dll'
Considering that there was no problem in PyCharm, it does not seem to be an environmental variable problem.
When I type the same command that was executed in VS Code in the command prompt window, another phrase appears,
"Connection failed because the target computer refused to connect."
My OS: Windows 10
I am using Anaconda, and I created a virtual environment.
vscode ver : 1.53.2
tensorflow ver : 2.4.1
CUDA : 11.2
cudnn : 8.1
It is due to tensorflow GPU support. Tensorflow now comes with GPU support and the system need graphics support and CUDA, CUDU installations. If you missed CUDA installation then you will get the above message. The latest version of tensorflow sometimes won't run without CUDA.
Try to install tensorflow 1.15 and python 3.7.4
https://www.python.org/ftp/python/3.7.4/python-3.7.4-amd64.exe
pip install tensorflow==1.15
NB: Normally tensorflow will run without cuda but the message will always shown in the prompt.
I would agree that this is due to your CUDA version, check the bottom of tensorflow GPU build config, it says for 2.4, you need CUDA 11.0 and cuDNN 8.0, which you have neither, in addition, you need MSVC 2019 to compile it.
Notice that for newer versions of tensorflow-gpu (>=2.3.0), conda will NOT download everything, you need to do them manually.
because it seems like all the evidence is pointing to GPU support problem, tensorflow-gpu might still run without using GPU, so it is possible that it was running on CPU when you use PyCharm,
I would suggest you double-check it runs as intended in PyCharm with
print(tf.config.list_physical_devices('GPU'))
or just simply reinstall everything
I copied "cudart64_110.dll" to the CUDA/v11.2/bin folder and it was resolved.

Tensorflow 2.2.0 GPU support on Ubuntu 20.04 LTS

So I decided to move over to Ubuntu 20.04 from Windows 10 since it's a better environment that's widely used in industry. I did encounter some problems when I cloned my clean Windows code from Github I immediately encountered issues when trying to run it. For context, my code utilizes Tensorflow 2.2.0 to segment images. I'm training from scratch with a dataset. The problem immediately occurs when I ran my train.py program. Initially there was an error which was fixed by inserting the following two lines immediately after importing Tensorflow (after verifying that Tensorflow could see and access my GPU on Ubuntu)
gpus = tf.config.experimental.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(gpus[0], True)
Following this, I get OOM errors despite being able to run the same code and dataset on my Windows OS. I was able to run the program once when I initially cloned the repo but the day after, I got these OOM errors and have been encountering them since. The code still works on Windows. The following log file shows what I got when I ran in Ubuntu 20.04 on the same machine I house my Windows on (I am dual booting). I installed TF GPU support exactly as they outlined with the versions they mentioned. The only part that worries me is that TF doesn't have Ubuntu 20.04 support, which I speculate may be causing this issue but as a new Ubuntu user, I can't be entirely sure. The output of the Terminal and the train.py program are linked below.
https://drive.google.com/drive/folders/1GRkqCwwdnoPWzsPklq2NIS82P1bFfRr1?usp=sharing
Relevant specs:
GPU - NVIDIA 2070 Super
CPU - Ryzen 3600
RAM - 32 GB
Tensorflow - 2.2.0
NVIDIA Driver - 451.x
CUDA - 10.1
cuDNN - 7.6.5
Does anyone have any insight into what could be causing this issue?

Installing Tensorflow and Keras on Intel Pentium

For a university we are supposed to implement a TensorFlow project using the python libraries for tensorflow and keras. I can install both of them just fine using pip3, but executing any piece of code results in some kind of error.
I've settled on testing the very complicated code:
import keras
Using python 3.6 and the newest tensorflow and keras (pip3 install tensorflow keras) I get the error ModuleNotFoundError: No module named 'tensorflow.python'; 'tensorflow' is not a package. I checked, and import tensorflow finds the package, but returns some error about AVX instructions and dumps the core.
I researched, and my CPU does not support AVX instructions which are part of tensorflow >= 1.6.0. I could not find a precompiled version that runs on my laptop without AVX, and I don't have the time to compile myself.
I tried downgrading to tensorflow == 1.5.0 and keras == 2.1.3 which was the version when tensorflow == 1.5.0 was around, but I still get missing errors, for each version and import statement a different one.
For example when I use the code:
import keras
from keras.datasets import mnist
I instead get the error AttributeError: module 'keras.utils' has no attribute 'Sequence'. I'm on an Intel Pentium, which I assume is the problem. I am fully aware that my setup is in no way suitable for machine learning, and it isn't supposed to be, but nevertheless I'd like to work on that assignment.
Anyone got experience with installing TensorFlow on older machines?
System:
Ubuntu 18.04.2 LTS
Intel(R) Pentium(R) 3556U # 1.70GHz (Dual Core)
4GB RAM
I had the same trouble, but it seems to have solved it. (However, the Python version shall be 3.5. )
For CPUs that do not support AVX, the tensorflow must be version 1.5 or lower.
If you want to install Tensorflow 1.5, the Python version must be 3.5 or lower.
The successful procedure is as follows.
(1) Uninstall your Anaconda.
(2) Download the following version of Anaconda from the following
URL. Version: Anaconda3-4.2.0-Windows-x86_64.exe
URL:https://repo.anaconda.com/archive/ or https://repo.anaconda.com/archive/Anaconda3-4.2.0-Windows-x86_64.exe
(3) Double-click the anaconda icon of “(2)” above, and install the
anaconda according to the GUI instructions.
(4) Start Anaconda Prompt
(5) Enter “pip install tensorflow==1.5” in Anaconda Prompt and press
the return key. Wait for the installation to finish. (See the log)
(6) Enter "pip install keras==2.2.4" in Anaconda Prompt and press the
return key. Wait for the installation to finish.(See the log)
This completes the installation. If you Enter " import tensorflow " on Jupiter notebook, some future error may displayed.(See this log.)
System:
My PC does not support AVX like your PC. My PC's specs are as follows.
PC:Surface Go
CPU:Intel(R) Pentium(R) CPU 4415Y @ 1.60 GHz
Windows10:64bit
How to test ?
Enter and execute the following command on Jupiter Note. Or use this file.
import tensorflow as tf
print(tf.__version__)
print(tf.keras.__version__)
or
import tensorflow as tf
hello = tf.constant('Hello, TensorFlow!')
sess = tf.Session()
print(sess.run(hello))
If your install is successful, then following message will be displayed on your Jupiter notebook
1.5.0
2.1.2-tf
P.S.
I'm not very good at English, so I'm sorry if I have some impolite or unclear expressions.
Sticking to the Pentium configuration is not recommended for default tensorflow builds because of AVX dependencies. Also many recent advances in this area are not available in earlier builds of TF and you will find it difficult to replicate research works. Options below:
Get a Google Colab (https://colab.research.google.com/) notebook, install Keras and TF and get going with your work
There have been genuine requests for this support, refer to this link [https://github.com/tensorflow/tensorflow/issues/18689] where unofficial builds are provided. See if one of them works
Build Tensorflow from scratch (very hard option), with the right set of flags for Bazel (remove all AVX/threading options)

exit code -1073741571 (0xC0000FD) with tensorflow in PyCharm

Description
I implemented a model with tensorflow via PyCharm on Windows 7. This implemented model worked well. After i got some problems i have to install a new OS (Windows 10). I also installed something that i used to run the model such as PyCharm, Anaconda, Git etc. Likewise in Anaconda i installed python, tensorflow, SimpleITK.
Problem
When i run the model on a new environment, i got a error below:
Process finished with exit code -1073741571 (0xC00000FD)
Solved
I created a new virtual environment on Anaconda that changed the versions of both python and tensorflow. The python is 3.6 to 3.5 and the tensorflow is 1.9 to 1.3. After that it works fine.

Can't import keras

I can't run keras; when I try to import keras from a Jupyter notebook I first see
Using TensorFlow backend.
in red, but then the kernel crashes and I see a prompt with:
Kernel Restarting
The kernel appears to have died. It will restart automatically.
If I try to run it directly with python (so I have a file called run.py that just imports keras) I get:
Using TensorFlow backend.
Illegal instruction: 4
I am on High Sierra (10.13.2) on a mid 2012 Macbook with a 2,9 GHz Intel Core i7 processor. I have python 3.6 installed on the latest conda and I am also running the latest versions of keras and tensorflow.
Thanks for any help!
Try to install mxnet-mkl library and then run keras.
Please see link below:
https://github.com/apache/incubator-mxnet/issues/8183

Categories