datahacker.rs@gmail.com

Category: Other

# K An implementation of a Shallow Neural Network in Keras – MNIST dataset

In this post we will see how we can classify handwritten digits using shallow neural network implemented in Keras. Our model will have 2 layers, with 64(height x width) neurons in the input layer and 10 neurons in the output layer.We will use normal initializer that generates tensors with a normal distribution. The optimizer we’ll use is Adam .It is an optimization algorithm that can be used instead of the classical stochastic gradient descent procedure…
Read more

#K An implementation of a Shallow Neural Network in Keras – Spirals dataset

In this post we will see how we can classify a spirals dataset with a shallow neural network implemented in Keras. Let’s start by importing libraries that we will need in the our code. Here, we will make our dataset and divide it into training and testing set. Let’s now create a shallow neural network! Next, we will make predictions and plot the accuracy and loss function of our model. Now, we will make some…
Read more

# K An implementation of a Shallow Neural Network in Keras – Moons dataset

In this post we will learn how to make classification of Moons dataset with a shallow neural network implemented in Keras. With the following code we are going to import all libraries that we will need. First, we will generate data set, then we will split it into training and test set. We will also print dimensions of these datasets. With the following code we will make a shallow neural network. Our shallow neural network…
Read more

#003 D TF Gradient Descent in TensorFlow

In this post we will see how to implement Gradient Descent using TensorFlow. First we will import all libraries that we will need in our code. Next, we will define our variable \(\omega \) and we will initialize it with \(-3 \). With the following peace of code we will also define our cost function \(J(\omega) = (\omega – 3)^2 \). With the next two lines of code we specify the initialization of our variables…
Read more