MadcowD
MadcowD

Reputation: 176

Can a TF graph feed into another without leaving the GPU in one session?

Suppose I have two TF graphs G_1, G_2 and I want to take the output of G_1 and feed it into G_2. My assumption is that to do this we enter the GPU on feed of G_1 and then taking the output of G_1 and feeding it into G_2 goes out to the CPU.

Is there any way to feed both graphs on the GPU?

Upvotes: 1

Views: 200

Answers (1)

rrao
rrao

Reputation: 641

In general you do not have to specify CPUs or GPUs explicitly. TensorFlow uses your first GPU, if you have one, for as many operations as possible.

The output of G_1 will go into G-2 which will also be executed on the GPU.

resource: Tensorflow Basic Usage

Upvotes: 2

Related Questions