Use this tag for programming-related questions about the softmax function, also known as the normalized exponential function. Questions specific to a certain programming language should also be tagged with that language.
Questions tagged [softmax]
534 questions
4
votes
1 answer
Does the last layer of a classifier neural network use both sigmoid and softmax?
Hidden layers of a classifier network use sigmoid or another activation function to introduce non-linearity and normalize the data, but does the last layer use sigmoid in conjunction with softmax?
I have a feeling it doesn't matter and the network…

Evan Weissburg
- 1,564
- 2
- 17
- 38
4
votes
1 answer
CNN: Softmax layer for pixel-wise classification
I want to understand in more details how a softmax layer can look in a CNN for semantic segmentation / pixelwise classification of an image. The CNN outputs an image of class labels, where each pixel of the original image gets a label.
After passing…

golden96371
- 350
- 6
- 19
4
votes
1 answer
Tensorflow: Weighted sparse softmax with cross entropy loss
I am doing image segmentation using fully convolutional neural networks (link to the paper): https://people.eecs.berkeley.edu/~jonlong/long_shelhamer_fcn.pdf
This can be considered as pixel classification (in the end each pixel is getting a label)
I…

TheRevanchist
- 331
- 1
- 4
- 12
4
votes
1 answer
How does the Softmax layer of Caffe calculates the probability values?
Does anyone know what computations take place inside the Caffe softmax layer?
I am using a pre-trained network with a softmax layer at the end.
In testing phase, for a simple forward of an image, the output of the second-last layer ("InnerProduct")…

GrimFix
- 91
- 6
4
votes
1 answer
Multilabel classification converges to all zeroes
I am attempting to do a one vs all multilabel classification. I feed a batch of input to each classifier along with expected labels. The classifiers use a softmax layer for output to predict a label as yes or no. Also I am using a softmax cross…

Abhishek Patel
- 774
- 5
- 19
4
votes
1 answer
What is the replace for softmax layer in case more than one output can be activated?
For example, I have CNN which tries to predict numbers from MNIST dataset (code written using Keras). It has 10 outputs, which form softmax layer. Only one of outputs can be true (independently for each digit from 0 to 9):
Real: [0, 1, 0, 0, 0, 0,…

ZFTurbo
- 3,652
- 3
- 22
- 27
4
votes
1 answer
np.sum for row axis not working in Numpy
I wrote a softmax regression function def softmax_1(x) that essentially takes in a m x n matrix, exponentiates the matrix, then sums the exponentials of each column.
x = np.arange(-2.0, 6.0, 0.1)
scores = np.vstack([x, np.ones_like(x), 0.2 *…

O.rka
- 29,847
- 68
- 194
- 309
4
votes
1 answer
Softmax Regression (Multinomial Logistic) with PyMC3
I am trying to implement a logistic multinomial regression (AKA softmax regression). In this example I am trying to classify the iris dataset
I have a problem specifying the model, I get an optimization error with find_MAP(). If I avoid using…

aloctavodia
- 2,040
- 21
- 28
4
votes
1 answer
How can I determine several labels in parallel (in a neural network) by using a softmax-output-layer in tensorflow?
Due to the project work of my master study I am implementing a neural network using the tensorflow library form Google. At that I would like to determine (at the output layer of my feed forward neural network) several labels in parallel. And as…

Miss Princess
- 41
- 2
4
votes
1 answer
Using Sparse Tensors to feed a placeholder for a softmax layer in TensorFlow
Has anyone tried using Sparse Tensors for Text Analysis with TensorFlow with success? Everything is ready and I manage to feed feed_dict in tf.Session for a Softmax layer with numpy arrays, but I am unable to feed the dictionary with…

Eduardo Garrido
- 41
- 1
- 3
4
votes
1 answer
Caffe: Softmax with temperature
I am working on implementing Hinton's Knowledge distillation paper. The first step is to store the soft targets of a "cumbersome model" with a higher temperature (i.e. I don't need to train the network, just need to do forward pass per image and…

Sid M
- 239
- 2
- 10
3
votes
1 answer
Is using softmax as a hidden layer activation function acceptable in a regression (NOT classification) problem?
I have done manual hyperparameter optimization for ML models before and always defaulted to tanh or relu as hidden layer activation functions. Recently, I started trying out Keras Tuner to optimize my architecture and accidentally left softmax as a…

WVJoe
- 515
- 7
- 21
3
votes
2 answers
Activation functions: Softmax vs Sigmoid
I've been trying to build an image classifier with CNN. There are 2300 images in my dataset and two categories: men and women. Here's the model I used:
early_stopping = EarlyStopping(min_delta = 0.001, patience = 30, restore_best_weights =…

bearthum
- 107
- 2
- 10
3
votes
1 answer
Pytorch Softmax giving nans and negative values as output
I am using softmax at the end of my model.
However after some training softmax is giving negative probability.In some situations I have encountered nans as probability as well.
one solution i found on searching is to use normalized softmax…however I…

Granth
- 325
- 4
- 17
3
votes
0 answers
Multiclass Text Classification Cannot Detect OutOfBound. (Critical Issue of Chatbot Application)
TL;DR
When implementing chatbot application, the first task is to detect intent for user's input text.
This is a typical Multiclass Text Classification.
Intent is class and the number of class to detect is finite.
Lots of utterances(examples) is…

Hyun-Sun Cho
- 31
- 1