About the `Softmax` in the `CAM_Module`
See original GitHub issueIs your code trying to improve numerical stability? Maybe it should be in this form.
energy_new = torch.max(energy, -1, keepdim=True)
energy_new = energy_new[0].expand_as(energy)
energy_new = energy - energy_new
attention = self.softmax(energy_new)
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Softmax Function Definition | DeepAI
The softmax function is a function that turns a vector of K real values into a vector of K real values that sum...
Read more >Softmax function - Wikipedia
The softmax function, also known as softargmax or normalized exponential function, converts a vector of K real numbers into a probability distribution of...
Read more >A Simple Explanation of the Softmax Function - victorzhou.com
Softmax turns arbitrary real values into probabilities, which are often useful in Machine Learning. The math behind it is pretty simple: ...
Read more >Softmax Activation Function with Python
Softmax is a mathematical function that converts a vector of numbers into a vector of probabilities, where the probabilities of each value ...
Read more >Softmax Activation Function: Everything You Need to Know
The softmax activation function transforms the raw outputs of the neural network into a vector of probabilities, essentially a probability distribution over the ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@lartpang Thanks, we have tried the form you provide, but the performance is not good
@lartpang Thanks