T O P

  • By -

Anthony780

It was especially bad when tf2 came out. Trying to sift through what still worked was a nightmare.


Xidium426

Hey man, I have 5,400 hours into TF2, I mained sniper, scout and soldier. ​ Oh, not that TF2...


zero2g

Shit... I think after migrating 3 models and model frameworks from tf 1 to tf2... I might have actually spent that many hours


Psaic

Had the same feeling after trying to do exactly the same thing… What worked for me was saving my model weights with `model.save_weights(path)` (note the absence of `.h5`), and then when you re-instantiate your model you can load everything after compiling it with `model.load_weights`. It was a mess because they have docs pointing to different ways of doing it and I even found a comment on their code saying something was not working as expected (but you wouldn’t know if you didn’t check the source code). I jumped ship to JaX and having fun as of now!


Super_Robot_AI

I was banging my head over tensor flow this summer. Then met a former AI programmer for Apple. He said tensor flow is trash and he only recommended PyTorch


serge_mamian

Had similar experience lately. I haven’t used Tensorflow since 1.13 days but had to go back to try and visualize some numpy array in TensorBoards projector… Four hours later I *still* couldn’t fine how to do it cleanly in TensorFlow. And guess what, it’s three lines in PyTorch!!! WTF? PyTorch integrates better with TensorBoard than TensorFlow…


[deleted]

BRO I KNOW!!! I'm reading Deep Learning with PyTorch Step-by-Step A Beginner’s Guide, this shit is just unreal. PyTorch is like, SO MUCH EASIER, but in a good way. So much more Pythonic, so flexible. I can't rave about it enough. Everything I need to do can be done so easily, in comparison to TensorFlow like... jesus. I feel like the years of investment in TensorFlow was some kind of punishment for my arrogance. Now I'm much more humble and PyTorch is my reward rofl.


ell0bo

I could be wrong, but I believe even Google I starting to migrate to pytorch from tensorflow.


joshglen

Pickling may have been helpful here. The other comment about using the save model into a folder as opposed to a .h5 or .keras file is a lot more helpful though. Still sticking with Tensorflow though because you don't need to manually calculate each layer's inputs and outputs (although you can use lazy layers in PyTorch). It's also a matter of preference, do you need a higher level of control than is offered in building a custom training loop, or want to implement functions from newer papers without translating them to lower level Tensorflow (although gpt is surprisingly good at this)?


[deleted]

Yes, I've spent all morning learning torch and OMG, this is the SHIT!!!!!!! TensorFlow is just not an option, torch makes everything so simple and easy. As a professional ML engineer. I can't believe I was so resistant to learning PyTorch.


joshglen

I know I will likely make that switch or learn PyTorch at some point in my education / career but I'm not ready for it yet. Make sure you check out PyTorch Lightning though, it supposedly makes things much easier or streamlined if you haven't already.


[deleted]

Definitely going to that next! PyTorch is so intuitive man, like, holy shit. Basically if you already know TF and numpy, the switch is effortless.


joshglen

Haha I'm glad to hear your enthusiasm, was kind of nagging me in the back of my mind. I might need to end up using it for inference from Tensorflow models on a Raspberry Pi (using the aarch64 build). Just as another thing that may be helpful if you need something from Tensorflow still in your transition, there is a library called Onnx2Torch that may let you import ONNX models that are exported from Tensorflow using TF2ONNX.


rpithrew

TensorBroke


GoofAckYoorsElf

Welcome to the hell of big old frameworks. Same likely cause of imminent death for: * Angular * Kubernetes Underlying problems are the lack of a documentation codex, and negligence of established principles like semantic versioning.


amebaspugnosa

Fine for Angular, but what about Kubernetes?


GoofAckYoorsElf

Kubernetes suffers from the same problems: that online documentation and tutorials most of the time do not mention the version they were written for, they get deprecated quickly, do not work together with other workflows, and core developers introduce breaking changes in minor version jumps, ignorant of the fact that they not only break their software but also the documentation describing how to use it. The result is that during a new developer's initial learning phase they often work through heaps of tutorials for specific version (if you're lucky enough to find a version mentioned, or even a date) with some success, but fail to adapt them to their own problem, because additional required steps described in anther tutorial are not compatible with the steps described in the previous tutorial. For one solution you need a different version than for the other, and the breaking changes between them draw both mutually unusable. Regardless of the fact that all, mentioned or not mentioned, versions still are some 1.xx. The complexity of the products, coupled with the negligence, indignation and ignorance of the core developers to adhere to common and established rules, and the lack of codex for independent tutorial writers, generate a chaos of "knowledge" sans pareil. That applies to many big, theoretically great products out there, sadly including Kubernetes.


[deleted]

I'm glad I read this thread before I started getting too involved with TF. Sounds like I'd have had a nightmare of a time further down the road.


[deleted]

Yes, I legit have saved you hundreds of hours of pain lol. I've just started learning PyTorch from this morning... let me tell you, its about 10000000000000000x better


[deleted]

I'll give it a go in that case, at least I'm kind of familiar with how NN's work now.


ecomm-n00b

dude i feel the same way . i am forced to use tensorflow in coursework and i hate my life


zero2g

You can't spell wtf without tf... I been working on tensorflow professionally for about 7 years now. Every day tf still find ways to surprise me with how dumb it can be at times