# Usability of Activation Function on Deep Learning

Explanation of 3 common activation functions on Deep learning by usability.

We can imagine activation Function is a thing that firing our brain (in this case neuron) to think. Maybe that illustration makes you more confuse :P

Anyway.. Without activation Function every calculation in each layer doesn’t have a meaning. Why? because the calculation is linear, which is input value has the same value with output value, implicitly. Activation function makes this is not(n) linear anymore.

Sigmoid function is used together with binary_crossentropy for loss function. And we used this on final or output Layer.

As we can see on…

# The Story of Long Short-term Memory (RNN)

If the Sequence is matter, then LSTM is good for your Machine Learning Layer.

When we want to Predict sequential series of data. For examples sentences, cryptocurrency or stock. We can train the datasets using RNN.

And then the layer that used to RNN training usually we use LSTM.

We take a look at `Sequential Series of data`. Because it’s a `Sequential` so the Sequence of the series data is very important. And each of the series of data influence each other data.

It’s like a Fibonacci Sequence number, every number influence to other number.

In Fibonacci the previous of…

# The Basic Weights Calculation Behind of DeepLearning

## Understanding the weights calculation with dot product and biases behind of Deep Learning

First of all if you use Keras as library, Keras provides some random weights. These weights will be the multiplied by features given from training parameter. And sum all the results.

The value of the weight will be optimized during training process, with optimizer, depends on the result of each epoch.

The calculation between weights and features uses dot product.

Why dot Product? because this calculation much simply to get similarity from some values (equation of vector).

# Over Fitting

• When the delta from your Train Accuracy and Test Accuracy is too much.
• When Test Accuracy value is larger than Train Accuracy

Usually overfitting occurs when you have too much Layer or too much training for your model.

• Making more simple training model, like remove some layer. Or use DropOut.
• Make Augmentation from our current dataset. (do pivot, flip or resizing)
• Adding more training data set.

# TFLite Converter, Easy Converter?

It looks easy when you read the tutorial about convert model, with 2 lines of codes.

`converter=tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)tflite_model=converter.convert()`

Yes it works, but in some conditions.

At that article, we know that TFLite converter doesn’t support string and float16, at least not yet.

There are some tutorials about text classification that use String for the input shape parameter at input layer, for example this tutorial provided by tensorflow. For now, you cannot convert the model from that tutorial into TFLite.

But actually you can make the text classification by encoding the text string into float or int.

If you don’t wanna…

# Step by Step Train Model using Tensorflow (CNN)

Step by Step to Train your own Image Dataset for Deep Learning Using Tensorflow

Actually there is an easiest way to train you own Image. You can use Firebase Machine Learning. You only have to upload your images and define the labels. But if you still wanna train a model by your hands, you can continue read this blog.

Anyway.. you can find the full source code and the datasets in here

# Prepare the Data Set

Prepare as many as possible sample images. Put them into each folders by the classification/labels.

For this i will use mine from this story. …

# NVIDIA RTX 3090 will be a Damn Good GPU for Machine Learning

Yesterday, NVIDIA has released a new series for RTX… 3090.

We know that GPU makes training process for machine learning faster than use CPU. Because GPU consists of hundreds of core.

did you know, Nvidia is using 10,496 CUDA cores on the RTX 3090.

WOW!!! it’s not hundreds man!!!

I cannot imagine how fast my train execution with this machine.

Actually i don’t have this stuff yet, not yet released on my country :(

If you want to use GPU for your machine learning, you can follow this tutorial.

Next time, once i have this GPU.. i will compare the training execution time. cheers..

Anyway,, If you want to learn how to train model with easy steps, you can read this.

# The 3 Basic Layers of Deep Learning

If you want to train your data set, then at least you must know these 3 Layers.

# Layers

We called this “the most well-known type of the Layer”. You can use this layer if you want to adding more Layer because your model need to more memorize some values.

Too much Dense Layer will causing Overfitting training.

Too less Dense Layer will causing your training is far from the best result.

And usually we added Dense Layer at the end of sequence of layers for fitting the number of output to number of classes.

This layer for training image datasets.

# My TFLite running on Desktop

I have TFlite Model and i want to run checking image on Desktop.

# Preparation

If you don’t have Python on your PC then you can install it from: Getting Start with Python.

You can use my sample TFLite Model. Inside my TFLite model there are 4 labels. indosiar_iklan, indosiar, sctv and sctv_iklan. If you confused with TFLite or Label you can read this.

# Execution

Use following script to run the TFLite

`import tensorflow as tfimport cv2.cv2 as cvimport pathlibimport sys# Load TFLite model and allocate tensors.interpreter = tf.lite.Interpreter(model_path="model.tflite")# Get input and output tensors.input_details = interpreter.get_input_details()output_details = interpreter.get_output_details()# input…`

# Simple TFLite Running on Android Phone

Checking State from Image with TensorFlow is very easy.

# Background Story

One day at office time, i am staring at local TV Channel playing on our App. My job is develop OTT App that provides lot of awesome content and some Local TV Channels. While i am stare at the app i saw something. Something that give me a Wonderfull idea.

I saw an opportunity to adding ads. On local TV Channel when playing ads, i can replace the content with our ads. How we know when is TV Channel playing ads? there is a pattern

# The Pattern

Channel TV Playing Content :

Channel…