Live data from Hacker News

My Python code is a neural network

blog.gabornyeki.com

1–10 of 75 posts

Re: My Python code is a neural network

#4
This is new to me, and therefore bad and scary.

It's great that you know NN well enough to fold it into regular work. But think of all us poor regular developers! Who now have to grapple with:

- an unfamiliar architecture

- uncertainty / effectively non-deterministic results in program flow

Re: My Python code is a neural network

#6
Recurrent neural networks can be used for arbitrary computations, the equivalence to Turing machines has been proven. However, they are utterly impractical for the task.

This seems to be a state machine that is somehow learned. The article could benefit from a longer synopsis and "Python" does not appear to be relevant at all. Learning real Python semantics would prove quite difficult due to the nature of the language (no standard, just do as CPython does).

Re: My Python code is a neural network

#8
Love this post! Gets into the details of what it _really_ means to take some function and turn it into an RNN, and comparing that to the "batteries included" RNNs included in PyTorch, as a learning experience.

Question:

> To model the state, we need to add three hidden layers to the network.

How did you determine that it would be three hidden layers? Is it a consequence of the particular rule you were implementing, or is that generally how many layers you would use to implement a rule of this shape (using your architecture rather than Elman's - could we use fewer layers with Elman's?)?

Re: My Python code is a neural network

#9
post #4

This is new to me, and therefore bad and scary. It's great that you know NN well enough to fold it into regular work. But think of all us poor regular developers! Who now have to grapple with: - an unfamiliar architecture - uncertainty / effectively non-deterministic results in program flow

NN are in principle deterministic (unless you add randomness to it such as is the case with LLM top p/k temperature).

Uncertainty is probably the better word of the two, but I feel like there should be a different term.

Re: My Python code is a neural network

#10
Really awesome. Thanks for this thorough write-up. I don't totally understand the deeper math concepts mentioned in this article around RNNs, but it's sparked some of my own thoughts. It feels similar to things I've been exploring lately-- that is: building your app interwoven with forward chaining algorithms. In your case, you're using RNNs, and in mine, I'm building into the Rete algorithm.

You also touch on something in this article that I've found quite powerful: putting things in terms of digesting an input string character-by-character. Then, we offload all of the reasoning logic to our algorithm. We write very thin i/o logic, and then the algorithm does the rest.

Post reply on HN