- Deep Learning with PyTorch
- Vishnu Subramanian
- 237字
- 2021-06-24 19:16:28
Model architecture for different machine learning problems
The kind of problem we are solving will decide mostly what layers we will use, starting from a linear layer to Long Short-Term Memory (LSTM) for sequential data. Based on the type of the problem you are trying to solve, your last layer is determined. There are three problems that we generally solve using any machine learning or deep learning algorithms. Let's look at what the last layer would look like:
- For a regression problem, such as predicting the price of a t-shirt to sell, we would use the last layer as a linear layer with an output of one, which outputs a continuous value.
- For classifying a given image as t-shirt or shirt, you would use a sigmoid activation function, as it outputs values either closer to one or zero, which is generally called a binary classification problem.
- For a multi-class classification, where we have to classify whether a given image is a t-shirt, jeans, shirt, or dress, we would use a softmax layer at the end our network. Let's try to understand intuitively what softmax does without going into the math of it. It takes inputs from the previous linear layer, for example, and outputs the probabilities for a given number of examples. In our example, it would be trained to predict four probabilities for each type of image. Remember, all these probabilities always add up to one.
推薦閱讀
- Arduino入門基礎教程
- Applied Unsupervised Learning with R
- 計算機應用與維護基礎教程
- 精選單片機設計與制作30例(第2版)
- 微服務分布式架構基礎與實戰(zhàn):基于Spring Boot + Spring Cloud
- R Deep Learning Essentials
- Intel Edison智能硬件開發(fā)指南:基于Yocto Project
- Hands-On Motion Graphics with Adobe After Effects CC
- Java Deep Learning Cookbook
- Blender 3D By Example
- Instant Website Touch Integration
- 微服務實戰(zhàn)
- Deep Learning with Keras
- 多媒體應用技術(第2版)
- Hands-On One-shot Learning with Python