<<

International Journal of Pure and Applied Mathematics Volume 118 No. 24 2018 ISSN: 1314-3395 (on-line version) url: http://www.acadpubl.eu/hub/ Special Issue http://www.acadpubl.eu/hub/

DECISION SUPPORT SYSTEM USING TENSOR FLOW

D.Anji Reddy1, G.Narasimha2, K.Srinivas3, B.Kavitha Rani4 1Assistant Professor,2,3,4Professor, Department of CSE, 1Vaageshwari College of Engineering, 2JNTUH College, 3,4 CMR Technical Campus 1 Karimnagar,India 2 Sultanpur,India 3,4Hyderabad, India.

May 24, 2018

Abstract Now a day Deep Learning is a service provided by all Cloud platforms. This service can be used by Tensor Flow in Google Cloud Platform (GCP), it makes users in easy way of application , development and deployment. Tensor Flow for deep learning research and development ap- plications used in many domains such as Natural Language Processing, Speech Recognition Translation, and Computer Vision etc. Tensor flow is also used to take recommend the user to take quick decision making.

1 Introduction

Tensor Flow [1-8] is an open source software library for numeri- cal computation using dataflow graphs. Nodes in the graph repre- sents mathematical operations, while graph edges represent multi- dimensional data arrays (tensors) communicated between them.

1 International Journal of Pure and Applied Mathematics Special Issue

The flexible architecture allows AP Is to deploy computation on computational devices such as desktop, mobile or server.Amazon [9], Google [10], Azure [11] cloud platforms are providing various services classification, regression, Clustering, anomaly detection, recommendation, ranking, frameworks, algorithms, GUIs, automa- tion levels. The service provided by all Cloud Platforms defined here as Machine Learning as a Service (MLaaS), such as AWS Deep Learning AMI, Apache MXNet and Gluon, Mi- crosoft Azure ML studioetc.TensorFlow is open source software for deep learning applications, used to process efficient computation of data flow graphs on single or multiple CPUs, GPUs and certain mobile operating systems. The advantages of using TensorFlow are: It has an intu- itive construct, because as the name suggests it has ”flow of ten- sors”. You can easily visualize each and every part of the graph.

Easily train on cpu/gpu for distributed . • Platform flexibility. You can run the models wherever you • want, whether it is on mobile, server or PC.

Limitations of TensorFlow: Even though TensorFlow is pow- erful, it’s still a low level library. For example, it can be considered as a machine level language, which need modularity and high level interface through the frameworks, such as Keras.

It’s still in development, so much more awesomeness to come. • It depends on your hardware specs, the more the merrier. • Still not an API for many languages. • There are still many things yet to be included in TensorFlow, • such as OpenCL support.

In the MNIST dataset, which is a dataset that contains 60,000 training samples and 10,000 testing samples of hand-written and labeled digits, 0 through 9, so ten total ”classes”.For further ad- vancedhigher level deep learning library is available on top of Ten- sorFlow called Keras; and GitHub repository.

2 International Journal of Pure and Applied Mathematics Special Issue

Figure 1 Flow graph of TensorFlow A Simple Tensor Flow example Tensor Flow is a type of graph based computation, it is an alternative model for a given mathematical calculations. Consider the following expression result= (var1+var2) (var2+5). We can break this function down into the following components: int1 = var1+var2 int2 = var2+5 result = int1 int2 The representation of the above operations graphically as follows:

Figure 2 Tensor Flow Graph for the expression result = int1 * int2

3 International Journal of Pure and Applied Mathematics Special Issue

2 DESCRIPTION

The expression is result = int1 * int2, is represented as flow graph. Where int1 is defined as var1 is added to var2; int2 is substituted as var2 added to a constant 5. Here var2 is contributed in two in- termediate results, in turn is contributed in result. The following is code to Tensorflow in python programming language. import ten- sor flow as tf tensor flow constant creation const = tf.constant(6.0, name = ”const”) tensorflow variables creation var1 = tf.variable(3.0, name = ’var1’) var2 = tf.variable(2.0, name = ’var2’)

The above snippet code explained as, tf.constant function de- fined as constant value, it consists of two parameters, where first parameter represents initial value and second element is type of constant value. tf.variable function to declare variables, the func- tion also consists of two elements, first is initial value and second element is name of the variable is optional. The value of a variable or constant can also be set explicitly thru keyboard by using ar- gument dtype such as tf.float32, tf.int32 etc. Next, we create the Tensor Flow operations: computation of operations int1= tf.add(var1, var2, name = ’int1’) int1= tf.add(var2, const, name = ’int2’) result = tf.multiply(int1, int2, name = ’result’)

TensorFlow provides good number of operations to perform all types of interactions. In the above code addition of variables, addi- tion of variable and constant value and a multiplication of variables. The next step is to setup an object to initialize the variables and the graph structure: variable initialization setup init op = tf.global variables initializer − − − The next step is to start Tensor Flow session with tf.session. All the operations are executed in Python syntax through the Tensor Flow session object. session starts with tf.session() as ses:

4 International Journal of Pure and Applied Mathematics Special Issue

variables initialization ses.run(init op) − the output of the graph a out = ses.run(result) − print(”variable result is ”.format(a out)) − First initialize the tensorflow session. This session can be exe- cuted by run command, which passes result. Here result is not a variable, operation as result = tf.multiply(int1, int2, name = ’re- sult’); as session is accepting only operations. It automatically cal- culates the necessary and dependent operations or values through its data flow graph. Finally the output is of scalar and assigned to a out, the value is displayed on the output screen. Extension − to the above simple example, if var1 can have array values, then calculation of result is performed with the TensorFlow placeholder. TensorFlow required to declare the data by using the tf.placeholder variable declaration. It has three arguments as type of placeholder variable, the second element is about size of array and it accepts even none argument with 1-dimensional data, and the third element is name of the variable. Therefore the var1 snippet code becomes as follows: TensorFlow variables var1 = tf.placeholder(tf.float32, [None, 1], name = ’var1’)

The change in program is the ses.run(result,) command: a out = ses.run(result,feed dict = resut:np.arange(0,10)[:,np.newaxis]) − − Where the argument feed dict is taking the input from Python − dictionary, every key is being filled in the name of the placeholder.

3 EXPERIMENTAL RESULTS

Using the Tensor Board functionality, the following is the graph that Tensor Flow created in the above program:

5 International Journal of Pure and Applied Mathematics Special Issue

Figure 3 Tensor Flow graph on Tensor Board

4 CONCLUSION

Tensor Flow enables developers to quickly and easily get started with deep learning in the cloud. Tensor flow is used to recommend the user to take quick decision making on any objects. Tensor Flow provides APIs for Python, C++, Haskell, Java, Go, Rust, and theres also a third-party package for R called tensor flow.

References

[1] https://www.analyticsvidhya.com/blog/2016/10/an- introduction-to-implementing-neural-networks-using- tensorflow/ [2] http://adventuresinmachinelearning.com/python-tensorflow- tutorial/ [3] https://www.datacamp.com/community/tutorials/tensorflow- tutorial [4] https://www.librec.net/datasets.html [5] https://docs.aws.amazon.com/dlami/latest/devguide/tutorial- tensorflow.html [6] https://github.com/GoogleCloudPlatform/cloudml- samples/tree/master/ [7] https://pythonprogramming.net/using-our-own-data- tensorflow-deep-learning-tutorial

6 International Journal of Pure and Applied Mathematics Special Issue

[8] https://aws.amazon.com/tensorflow/?nc2=htm1

[9] https://cloud.google.com/solutions/big-data/

[10] 11.https://blogs.msdn.microsoft.com/uk faculty connection/2017/03/27/azure- − − gpu-tensorflow-step-by-step-setup/

7