Live data from Hacker News

A friendly Introduction to Backpropagation in Python

sushant-choudhary.github.io

11–15 of 15 posts

Re: A friendly Introduction to Backpropagation in Python

#11
post #8

Some suggestions: 1) I would make a better distinction between the function declaration and the program output. e.g: format the output differently. like gray. 2) Capitalization. "InvalidWRTargError". It would help if you could capitalize it as "InvalidWrtArgError". This is a guideline in most coding standards. https://en.wikipedia.org/wiki/Camel_case#In_abbreviations 3) Better naming: - "getNumericalForwardGradient":…

Thanks partycoder! Points taken; will make some changes. Regarding numerical gradients, named it so to differentiate it from analytical gradients, which leverage formulas from calculus. The "numerical" ones are calculated using (f(x+h)-f(x))/h every time.

I see the difference now, thanks for the clarification.

Re: A friendly Introduction to Backpropagation in Python

#12
post #4

I had a really good time adapting Karpatny's blog post to python myself but it didn't give me sufficient understanding so i continued with [1], then [2] and finally deciphering [3]. [1] https://mattmazur.com/2015/03/17/a-step-by-step-backpropagat... [2] http://peterroelants.github.io/posts/neural_network_implemen... [3] https://iamtrask.github.io/2015/07/12/basic-python-network/

I'd like your opinions on this that I wrote: https://blog.chewxy.com/2016/12/06/a-direct-way-of-understan...

Re: A friendly Introduction to Backpropagation in Python

#13
post #8

Earlier quoted context omitted.

Thanks partycoder! Points taken; will make some changes. Regarding numerical gradients, named it so to differentiate it from analytical gradients, which leverage formulas from calculus. The "numerical" ones are calculated using (f(x+h)-f(x))/h every time.

Python community conventions are not camel case for functions... forwardAddGate would be forward_add_gate and return is not a function call... return(max(x,y)) or return(x+y) would be return max(x, y) or return x + y spaces around operators... x + y not x+y spaces around function args... def foo(a, b) not def foo(a,b) and when calling... foo(1, 2) not foo(1,2) https://www.python.org/dev/peps/pep-0008/ Just things to…

There's a package that verifies PEP8 for you. https://pypi.python.org/pypi/pep8
Post reply on HN