Communication between Keras and Backend like Tensorflow, Theano

Keras is a high level neural network API providing python library which uses tensor flow or theano or cntk as backend. What are the primary roles of backend libraries? Is it implementation? or Is it computational heavylifting using GPU, threading etc?

I couldn't find any good resources online to understand how keras interacts with tensor flow or theano(backend) session. Any such resource or direction for understanding interaction is helpful !

Topic keras tensorflow theano python

Category Data Science


Keras is a high level API but the backend is readily available. You simply access it by doing:

from keras import backend as K

The K will then be the same as tf as if you imported Tensorflow like this:

import tensorflow as tf

So you can use K to perform lower level operations with the backend.

For more information you can read the Keras backend documentation.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.