TensorFlow with GPU support
Questions tagged [tensorflow-gpu]
430 questions
48
votes
6 answers
How to set specific gpu in tensorflow?
I want to specify the gpu to run my process. And I set it as follows:
import tensorflow as tf
with tf.device('/gpu:0'):
a = tf.constant(3.0)
with tf.Session() as sess:
while True:
print sess.run(a)
However it still allocate memory…
![](../../users/profiles/4696856.webp)
lhao0301
- 1,641
- 3
- 15
- 24
42
votes
5 answers
Understanding the ResourceExhaustedError: OOM when allocating tensor with shape
I'm trying to implement a skip thought model using tensorflow and a current version is placed here.
Currently I using one GPU of my machine (total 2 GPUs) and the GPU info is
2017-09-06 11:29:32.657299: I…
![](../../users/profiles/1831512.webp)
stackunderflow
- 2,547
- 3
- 19
- 29
34
votes
4 answers
tensorflow Mac OS gpu support
According to
https://www.tensorflow.org/install/install_mac Note: As of version 1.2, TensorFlow no longer provides GPU support on Mac OS X.
GPU support for OS X is no longer provided.
However, I would want to run an e-gpu setup like akitio node…
![](../../users/profiles/2587904.webp)
Georg Heiler
- 13,862
- 21
- 115
- 217
32
votes
3 answers
How do I specify nvidia runtime from docker-compose.yml?
I am able to run a tensorflow container w/ access to the GPU from the command line w/ the following command
$ sudo docker run --runtime=nvidia --rm gcr.io/tensorflow/tensorflow:latest-gpu
I would like to be able to run this container from…
![](../../users/profiles/2313424.webp)
rissem
- 423
- 1
- 5
- 11
21
votes
2 answers
Very low GPU usage during training in Tensorflow
I am trying to train a simple multi-layer perceptron for a 10-class image classification task, which is a part of the assignment for the Udacity Deep-Learning course. To be more precise, the task is to classify letters rendered from various fonts…
![](../../users/profiles/1645784.webp)
Aleksei Petrenko
- 5,624
- 7
- 42
- 80
21
votes
2 answers
How to optimize for inference a simple, saved TensorFlow 1.0.1 graph?
I cannot successfully run the optimize_for_inference module on a simple, saved TensorFlow graph (Python 2.7; package installed by pip install tensorflow-gpu==1.0.1).
Background
Saving TensorFlow Graph
Here's my Python script to generate and save a…
![](../../users/profiles/5874320.webp)
tdube
- 2,103
- 2
- 13
- 25
18
votes
4 answers
Keras with TensorFlow backend not using GPU
I built the gpu version of the docker image https://github.com/floydhub/dl-docker with keras version 2.0.0 and tensorflow version 0.12.1. I then ran the mnist tutorial https://github.com/fchollet/keras/blob/master/examples/mnist_cnn.py but realized…
![](../../users/profiles/6467567.webp)
Kong
- 1,740
- 6
- 19
- 38
17
votes
3 answers
TensorFlow:ValueError: 'images' contains no shape
I used TensorFlow function tf.image.resize_images to resize my image, but I got this Error in Code:
ValueError: 'images' contains no shape.
The full code is below:
# -*- coding: utf-8 -*-
import tensorflow as tf
file = ["./1.jpg"]
f =…
![](../../users/profiles/7006377.webp)
mxl
- 199
- 1
- 9
15
votes
2 answers
How to understand tf.get_collection() in TensorFlow
I am confused by tf.get_collection() form the docs, it says that
Returns a list of values in the collection with the given name.
And an example from the Internet is here
from_vars = tf.get_collection(tf.GraphKeys.TRAINABLE_VARIABLES,…
![](../../users/profiles/5046896.webp)
GoingMyWay
- 13,866
- 24
- 83
- 122
14
votes
1 answer
Is there a way to use tensorflow map_fn on GPU?
I have a tensor A with shape [a,n] and I need to perform an op my_op with another tensor B of shape [b,n] such that the resulting tensor C has shape [a,b].
In other words: For each subtensor in A (A[0], A1,...A[n]) I need to perform an element wise…
![](../../users/profiles/6520775.webp)
frxbst
- 141
- 2
- 5
13
votes
1 answer
Is there anyway to use tensorflow-gpu with intel(r) hd graphics 520?
I am working on my master's project which uses keras and tensorflow backend .I have intel(r) hd graphics 520 ,So I am not able to use tensorflow-gpu. The cpu version is working fine .Is there any way to use tensorflow-gpu with the intel(r) hd…
![](../../users/profiles/3465388.webp)
bibinjose
- 424
- 1
- 8
- 13
13
votes
1 answer
How does one move data to multiple GPU towers using Tensorflow's Dataset API
We are running multi GPU jobs on Tensorflow and evaluating a migration from the queue based model (using the string_input_producer interface) to the new Tensorflow Dataset API. The latter appears to offer an easier way to switch between Train and…
![](../../users/profiles/448844.webp)
7hacker
- 1,648
- 2
- 16
- 29
13
votes
1 answer
How faster is tensorflow-gpu with AVX and AVX2 compared with it without AVX and AVX2?
How faster is tensorflow-gpu with AVX and AVX2 compared with it without AVX and AVX2?
I tried to find an answer using Google but with no success. It's hard to recompile tensorflow-gpu for Windows. So, I want to know if it worth it.
![](../../users/profiles/865475.webp)
Dmitry
- 13,126
- 20
- 95
- 177
13
votes
5 answers
How to retrieve float_val from a PredictResponse object?
I am running a prediction on a tensorflow-serving model, and I get back this PredictResponse object as output:
Result:
outputs {
key: "outputs"
value {
dtype: DT_FLOAT
tensor_shape {
dim {
size: 1
}
dim {
…
![](../../users/profiles/8221826.webp)
Dylan Randle
- 251
- 2
- 10
11
votes
2 answers
Tensorflow Java Multi-GPU inference
I have a server with multiple GPUs and want to make full use of them during model inference inside a java app.
By default tensorflow seizes all available GPUs, but uses only the first one.
I can think of three options to overcome this…
![](../../users/profiles/4850610.webp)
Alexander Lutsenko
- 2,050
- 6
- 14