Installing and importing the required packages

TensorFlow, as a package, is built to perform neural network computations. It works with the lazy evaluation concept, where the various elements of a neural network connection are to be specified, before executing the code.

Another API named Keras makes building neural networks a lot easier. In this chapter, we will be first leveraging the Keras package with TensorFlow running in its backend, and then we'll show how to build a neural network using the premade estimator and a custom estimator in TensorFlow.

In the previous chapters, we understood how to set up Datalab notebooks. In this chapter, we will see how to install and import the required packages into Datalab notebooks.

By default, Datalab comes with a preinstalled TensorFlow package. However, it does not contain Keras by default. Let's look at installing the keras package:

!pip install keras

Once Keras is installed, let's import both the required packages:

import keras as K
import tensorflow as tf
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.159.198