Skip to main content

Deep Learning: Which Loss and Activation Functions should I use?

Deep Learning: Which Loss and Activation Functions should I use?


What are you trying to solve?

Are you trying to predict a numerical value?

Are you trying to predict a categorical outcome?

Regression: Predicting a numerical value

Final Activation Function

Loss Function

Categorical: Predicting a binary outcome

Final Activation Function

Loss Function

Categorical: Predicting a single label from multiple classes

Final Activation Function

Loss Function

Categorical: Predicting multiple labels from multiple classes

Final Activation Function

Loss Function

Summary Table

 

Comments

Popular posts from this blog

Cost, Activation, Loss Function|| Neural Network|| Deep Learning. What are these?

  What is the difference between cost function and activation function? A cost function is a measure of error between what value your model predicts and what the value actually is. For example, say we wish to predict the value yi for data point xi. represent the prediction or output of some arbitrary model for the point xi with parameters θ. One of the many cost functions could be this function is known as the L2 loss. Training the hypothetical model we stated above would be the process of finding the θ that minimizes this sum. -An activation function transforms the shape/representation of the data g o ing into it. A simple example could be max(0, xi), a function which outputs 0 if the input xi is negative or xi if the input xi is positive. This function is known as the “ReLU” or “Rectified Linear Unit” activation function. The choice of which function(s) are best for a specific problem using a particular neural architecture is still under a lot of discussions. However, these repre...

Installing Tensorflow with CUDA, cuDNN and GPU support on Windows 10

  Prerequisites To start, you need to play the version tracking game. First, make sure your graphics card can support CUDA by finding it on this list:  https://developer.nvidia.com/cuda-gpus . For example, laptop has a GeForce GTX 1060, which supports CUDA and Compute Capability 6.1. You can find the model of your graphics card by clicking in the Windows search bar and entering “dxdiag.” This tool will identify your system’s hardware. The  Display  tab should list your graphics card (if present on your computer). Then, we need to work backwards, as TensorFlow usually does not support the latest CUDA version (note that if you compile TensorFlow from source, you can likely enable support for the latest CUDA, but we won’t do that here). Take a look at  this chart to view the required versions of CUDA and cuDNN . At the time of writing, this is the most recent TensorFlow version and required software: Version Python version Compiler Build tools cuDNN CUDA tensorflow...