layered icon indicating copy to clipboard operation
layered copied to clipboard

Question about Softmax delta function

Open howardyclo opened this issue 9 years ago • 0 comments

Hello

First, thanks for your modular implementation for neural nets. It benefits me a lot for learning neural nets. Here is one question, when I was tracing your code in Softmax class implementation, I couldn't understand what does the code in delta function. It'll be nice if you can explain this, thanks! Are there references when you write this code ? Thanks.

    def delta(self, incoming, outgoing, above):
        delta = outgoing * above
        sum_ = delta.sum(axis=delta.ndim - 1, keepdims=True) # I don't understand this line
        delta -= outgoing * sum_ # I don't understand this line
        return delta

howardyclo avatar Oct 10 '16 16:10 howardyclo