Posts

Showing posts with the label Tensorflow; Perceptron;

Let's Create a Perceptron Using Tensorflow

Image
 There are 5 main steps in training a neural network which is even common for the atomic unit of its perception. Define the network: This could be a lot of layers of neurons. For this case just a perceptron. Prepare the training data: Here we will generate a zero-dimensional tensor with 1000 random values. Define loss and optimizer functions. Optimize use in the training phase to measure and minimize the loss. Train the model with training data to minimize the loss. This is the step we find for what values of weight and bias the training data will fit the model (Here just like y = mx + c ) Validate the model The perception consists of two trainable values namely Weight (W) and Bias (b).  As the loss function, we here going to use the Mean squared error loss. 01 Lets define the Perceptron class # Define the model  class   Perceptron () :    def   __init__ ( self ) :      # initializing the trainable...