Javatpoint Logo
Javatpoint Logo

Classification of Neural Network in TensorFlow

Artificial neural networks are computational models which are inspired by biological neural networks, and it is composed of a large number of highly interconnected processing elements called neurons.

An ANN (Artificial Neural network) is configured for a specific application, such as pattern recognition or data classification.

It can derive meaning from complicated or imprecise data.

It extracts patterns and detects trends that are too complex to be noticed by either humans or other computer techniques.

Classification of Neural Network in TensorFlow

Transfer Function

The behavior of ANN (Artificial Neural Network) depends on both the weights and the input-output function, which is specified for the unit. This function falls into one of these three categories:

  • Linear (or ramp)
  • Threshold
  • Sigmoid

Linear units: The output activity is proportional to the total weighted output in linear units.

Threshold: The output is set at one of two levels, depending on whether the total input is greater than or less than some threshold value.

Sigmoid units: The output varies continuously but not linearly as the input changes. Sigmoid units bear a more considerable resemblance to real neurons than do linear or threshold units, but all three must be considered rough approximations.

Below is the code by which we classify the neural network.

Firstly, we made an activation function so that we have to plot as POPC and to create the sigmoid function, which is an effortless activation function takes in Z to make the sigmoid.

Classification of Neural Network in TensorFlow
Classification of Neural Network in TensorFlow

Then, we make the operation which inherits sigmoid. So let's see a classification example and sikat learn has a helpful function and capabilities to create data set for us. And then we are going to say my data is equal to make blobs. It just creates a couple of blobs there that we can classify. So, we have to create 50 samples and the number of features to a status that's going to make two blobs, so this is just a binary classification problem.

Classification of Neural Network in TensorFlow
Classification of Neural Network in TensorFlow
Classification of Neural Network in TensorFlow

Now, we have to create the scatterplot of features all the rows in column 0 and so if we do scatterplot of two distinctive blobs and able to classify these two highly separable classes.

Classification of Neural Network in TensorFlow
Classification of Neural Network in TensorFlow
Classification of Neural Network in TensorFlow
Classification of Neural Network in TensorFlow
Classification of Neural Network in TensorFlow

Here, we're going to build a matrix of one that's a matrix of one by two. And then, we pass that into our sigmoid function say sigmoid Z because that's necessarily going to output is 0 or 1 for us as we're classifying them based on whether it is positive or negative.

The more positive input, the more sure our model is going to be that it belongs to the one class.

Classification of Neural Network in TensorFlow
Classification of Neural Network in TensorFlow

So now we were able to successfully use our graph objects placeholders variables activation functions to the recession and able to perform a very simple classification. And hopefully, soon we know how to do this manually it's going to make learning tensor flow a lot and easier in performing all essential functions with the TensorFlow.

In our next topics, we learn about the TensorFlow basics.


Next TopicLinear Regression





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA