softmax Questions

3

Solved

This is the screen of the original paper: the screen of the paper. I understand the meaning of the paper is that when the value of dot-product is large, the gradient of softmax will get very small....
Ningpo asked 27/2, 2019 at 12:42

2

I'm trying to find approach to compute the softmax probability without using exp(). assume that: target: to compute f(x1, x2, x3) = exp(x1)/[exp(x1)+exp(x2)+exp(x3)] conditions: 1. -64 < x1...
Settlement asked 4/6, 2020 at 8:25

5

Solved

I know that logistic regression is for binary classification and softmax regression for multi-class problem. Would it be any differences if I train several logistic regression models with the same ...

1

Solved

I'm trying to implement a Softmax activation that can be applied to arrays of any dimension and softmax can be obtained along a specified axis. Let's suppose I've an array [[1,2],[3,4]], then if I...
Abdominal asked 24/9, 2022 at 11:11

2

I am trying to do sentiment analysis on a german tweet-data-set with the bert-base-german-cased modell which i imported over transformers from hugginface. To be able to calculate the predicted pro...
Breughel asked 7/6, 2020 at 11:10

4

Solved

I am watching some videos for Stanford CS231: Convolutional Neural Networks for Visual Recognition but do not quite understand how to calculate analytical gradient for softmax loss function using n...
Grace asked 15/1, 2017 at 17:8

2

I'm trying to implement the softmax function for a neural network written in Numpy. Let h be the softmax value of a given signal i. I've struggled to implement the softmax activation function's ...
Cherey asked 29/3, 2016 at 9:7

2

I tried to find documents but cannot find anything about torch.softmax. What is the difference among torch.nn.Softmax, torch.nn.funtional.softmax, torch.softmax and torch.nn.functional.log_softmax?...
Apfel asked 17/9, 2021 at 3:8

1

I have a Tensorflow multiclass classifier that is generating nan or inf while computing probabilities using tf.nn.softmax. See the following snippet (logits is of shape batch_size x 6, since I have...
Lazaro asked 30/8, 2021 at 18:35

3

I am currently trying to reproduce the results of the following article. http://karpathy.github.io/2015/05/21/rnn-effectiveness/ I am using Keras with the theano backend. In the article he talks ab...
Koblenz asked 16/5, 2016 at 2:50

4

I know how to make softmax stable by adding to element -max _i x_i. This avoids overflow and underflow. Now, taking log of this can cause underflow. log softmax(x) can evaluate to zero, leading to...
Raptorial asked 20/5, 2017 at 1:27

2

Given: x_batch = torch.tensor([[-0.3, -0.7], [0.3, 0.7], [1.1, -0.7], [-1.1, 0.7]]) and then applying torch.sigmoid(x_batch): tensor([[0.4256, 0.3318], [0.5744, 0.6682], [0.7503, 0.3318], [0.24...
Copalm asked 24/10, 2019 at 10:51

10

Solved

In the output layer of a neural network, it is typical to use the softmax function to approximate a probability distribution: This is expensive to compute because of the exponents. Why not simpl...
Giraudoux asked 19/6, 2013 at 9:20

1

Solved

Given input like: tensor([[[1.9392, -1.9266, 0.9664], [0.0000, -1.9266, 0.9664], [0.0000, -0.0000, 0.9664]]]) My desired output is: tensor([[[0.4596, 0.0096, 0.1737], [0.0000, 0.0096, 0.1737], ...
Maidie asked 19/4, 2021 at 15:14

5

Solved

For a neural networks library I implemented some activation functions and loss functions and their derivatives. They can be combined arbitrarily and the derivative at the output layers just becomes...
Adrienadriena asked 5/11, 2015 at 10:16

2

Solved

I am trying to understand a simple implementation of Softmax classifier from this link - CS231n - Convolutional Neural Networks for Visual Recognition. Here they implemented a simple softmax classi...
Harlanharland asked 27/8, 2015 at 20:23

24

Solved

From the Udacity's deep learning class, the softmax of y_i is simply the exponential divided by the sum of exponential of the whole Y vector: Where S(y_i) is the softmax function of y_i and e is t...
Catechism asked 23/1, 2016 at 20:52

2

Solved

Suppose I have the following tensor t as the output of a softmax function: t = tf.constant(value=[[0.2,0.8], [0.6, 0.4]]) >> [ 0.2, 0.8] [ 0.6, 0.4] Now I would like to convert this matri...
Rochette asked 29/7, 2016 at 8:53

2

Solved

For any 2D tensor like [[2,5,4,7], [7,5,6,8]], I want to do softmax for the top k element in each row and then construct a new tensor by replacing all the other elements to 0. The result shoul...
Neurasthenic asked 13/11, 2018 at 12:20

2

Solved

Which dimension should softmax be applied to ? This code : %reset -f import torch.nn as nn import numpy as np import torch my_softmax = nn.Softmax(dim=-1) mu, sigma = 0, 0.1 # mean and standa...
Cockney asked 26/9, 2018 at 8:59

1

Solved

I am trying to implement a Softmax Cross-Entropy loss in python. So, I was looking at the implementation of Softmax Cross-Entropy loss in the GitHub Tensorflow repository. I am trying to understand...
Upend asked 2/5, 2020 at 11:39

5

Solved

Most examples of neural networks for classification tasks I've seen use the a softmax layer as output activation function. Normally, the other hidden units use a sigmoid, tanh, or ReLu function as ...

1

Solved

So I'm struggling to understand some terminology about collections in Pytorch. I keep running into the same kinds of errors about the range of my tensors being incorrect, and when I try to Google f...
Vapid asked 12/1, 2020 at 13:57

4

Solved

Is there a numerically stable way to compute softmax function below? I am getting values that becomes Nans in Neural network code. np.exp(x)/np.sum(np.exp(y))
Fountainhead asked 4/3, 2017 at 18:11

6

Solved

When I use this it does not give any error out_layer = tf.add(tf.matmul(layer_4 , weights['out']) , biases['out']) out_layer = tf.nn.softmax(out_layer) But when I use this model=Sequential() ...
Todd asked 9/6, 2018 at 16:59

© 2022 - 2024 — McMap. All rights reserved.