site banner

Friday Fun Thread for September 8, 2023

Be advised: this thread is not for serious in-depth discussion of weighty topics (we have a link for that), this thread is not for anything Culture War related. This thread is for Fun. You got jokes? Share 'em. You got silly questions? Ask 'em.

3
Jump in the discussion.

No email address required.

ChatGPT-4 is incredible for debugging Python code. In ML I paste in the error text, paste in my model pipeline, paste in the functions/classes for any custom layers in tensorflow, and more often than not it identifies exactly where the issue is, corrects whatever wacky einsum array operation i failed to implement correctly, then spits out the fixed code. No more 2 hours spent on StackOverflow trial and error. The American version of CoPilot preview apparently has GPT4 chat based debugging in but sadly I can’t access it yet.

And yeah, agree on cooking. I still like visiting actual recipe websites because I’m a visual learner and like seeing pictures or watching video of the steps, but being able to have a dialogue about ingredients and options is fantastic.

Stop using tensorflow in 2023. I've shifted entire projects over to PyTorch and still came out ahead by the end of it just due to how shitty tensorflows API is (PyTorch is damn good too).

I've been slowly trying PyTorch but the allure of borderline pseudocode ML via Keras is hard to resist, any time I try to look up how to do what I want in PyTorch it's always like this amusing example. Tensorflow sucks but it lets you mix and match custom stuff with Keras which I don't think (?) PyTorch has an equivalent too yet.

Theres "Pytorch Lightning" which is the most popular high level wrapper for pytorch. Theres also other projects like "skorch" that gives u an sklearn api in pytorch.

Keras is going to support PyTorch backend soon as well.

But heres the thing. PyTorch is fun to write. The code just flows out of your fingers. Its intuitive and beatifully pythonic. If youve dabbled with oop for long enough the pytorch code on the right is more intuitive than the keras code on the right. Completely ignoring that u can do some serious fucking work with a lower level api.

The training loop is mostly boiler plate btw.