03
JanChristmas Special : Upto 40% OFF! + 2 free courses - SCHEDULE CALL
The majority of information within the world is unlabeled and unstructured. Shallow neural networks cannot simply capture relevant structure in, for example, images, sound, and matter information. Deep networks square measure capable of discovering hidden structures inside this sort of information. Traditional neural networks think about shallow nets, composed of 1 input, one hidden layer and one output layer. Deep-learning networks square measure distinguished from these standard neural networks having an additional hidden layer, or questionable additional depth. These quite nets square measure capable of discovering hidden structures inside unlabeled and unstructured information (i.e. images, sound, and text), that is that the overwhelming majority of information within the world.
Deep learning is a man-made brainpower work that emulates the elements of the human mind in planning data and making structures for use in powerful or can say dynamic. Deep learning is a subpart of AI in man-made reasoning that has frameworks fit for taking in independent from data that is unstructured or unlabeled.
TensorFlow is one of the most effective libraries to implement deep learning. TensorFlow may be a code library for numerical computation of mathematical expressional, by using information flow graphs. The graph comprises of various nodes and each node inside the graph specifies certain mathematical operation and the edges show the flow of data between nodes which is also known as tensors. It is an open-source library created by Google and tailored for Machine Learning. It is originally designed for the task that requires heavy numerical computations. It's being wide accustomed to develop solutions with Deep Learning. Because of the availability of C/C++ in the backend, TensorFlow runs faster than pure Python code.
Data flow graphs execution decides the structure of TensorFlow. A data flow graph consists of two main parts:
The standard usage is to build a graph and execute it after the session is created by using the ‘run’ and ‘eval’ operations. Inputs are fed into nodes through variables or placeholder.
DSWB: Data science workbench
It allows us to deploy computation on one or more CPU, GPU, Android or iOS. All of this can be done using a single API.
Python language is used for writing the programs in TensorFlow. Python can be easily downloaded from https://www.python.org/downloads/.
Now next step is to open a command line as administrator and write the below code for installing Python.
pip3 install --upgrade tensorflow
For testing the installation enter the following code:
After running the above code, it will generate the below output.
“Hi! Welcome to Tensorflow”
Examples:
In TensorFlow, the computation can be explained as data flow and operations in the form of a directed graph.
Data Science Training - Using R and Python
The first example is a very basic one which explains the basic functionality like how to create sessions, define constants and how to use these constants and sessions to perform computations.
After running the above code, it will generate the below output.
35
The next example implements a Linear Regression using TensorFlow.
# y = 0.3+x*0.1, hence by using numpy 100 phony x, y data points are created
x_data = np.random.rand(100).astype(np.float32)
y_data = x_data * 0.1 + 0.3
# calculate y_data = b+W * x_data, by finding the values for b and W
# Knowing that b should be 0.3 and W 0.1, but it will be sorted out by the tensorflow
W = tf.Variable(tf.random_uniform([1], -1.0, 1.0))
b = tf.Variable(tf.zeros([1]))
y = W * x_data + b
# mean squared errors is minimized here.
loss = tf.reduce_mean(tf.square(y - y_data))
optimizer = tf.train.GradientDescentOptimizer(0.5)
train = optimizer.minimize(loss)
# Before starting, initialize the variables. We will 'run' this first.
init = tf.initialize_all_variables()
# Launch the graph.
sess = tf.Session()
sess.run(init)
# Fit the line.
for step in xrange(201):
sess.run(train)
if step == 0:
print(step, sess.run(W), sess.run(b))
# according to output best fit is W: [0.1], b: [0.3]
After running the above code, it will generate the below output.
Applications:
In this blog, we have discussed about TensorFlow and how to work with deep learning on TensorFlow. Firstly, we have discussed in detail regarding the deep learning concepts and TensorFlow basics. Further, we have seen to setup and install TensorFlow on your system and some examples of TensorFlow like how to perform some basic computation and also the linear regression part. Finally, we concluded our discussion by talking about the real-life applications of Deep Learning with TensorFlow.
Please leave query and comments in the comment section.
A dynamic, highly professional, and a global online training course provider committed to propelling the next generation of technology learners with a whole new way of training experience.
Cyber Security
QA
Salesforce
Business Analyst
MS SQL Server
Data Science
DevOps
Hadoop
Python
Artificial Intelligence
Machine Learning
Tableau
Search Posts
Related Posts
Receive Latest Materials and Offers on Data Science Course
Interviews