Ask Your Question

aidanjd12's profile - activity

2021-03-24 01:44:46 +0200 marked best answer Elementwise functions for deep learning

Let's say I want to define a softmax function over a vector input.

In Python/Numpy that would look something like this

X = np.array([x1, x2, x3]) 
numerators = np.exp(X)
denominator = np.sum(numerators)
softmax_probs = numerators / denominators # [e^x1 / sum(e^x1, e^x2, e^x3), e^x2 / sum(e^x1, e^x2, e^x3),...

What would be a good way of going about this in sage?

2021-03-24 01:44:46 +0200 received badge  Scholar (source)
2021-03-23 22:04:07 +0200 asked a question Elementwise functions for deep learning

Elementwise functions for deep learning Let's say I want to define a softmax function over a vector input. In Python/Nu