Recent comments in /f/deeplearning

OutrageousSundae8270 t1_j5g51tx wrote

I'm know the TensorFlow API really well considering I've been using it for about 2 years now.

I've used PyTorch before as well, its really not hard to learn the other once you're good at one of them.

PyTorch is a little more verbose than TensorFlow , e.g. TensorFlow has a default training loop that can be started by invoking the fit method where as in PyTorch you write the training loop yourself regardless, you always have to explicitly call methods for AD/Back propagation as well in PyTorch.

1

OutrageousSundae8270 t1_j5g4152 wrote

One of the posters in that thread says "Google always struggled to build a long lasting ecosystems for their products", I don't even see how that is relevant anymore since TF has been open sourced and is not necessarily maintained by Google anymore.

PyTorch is more popular I concede that, but I don't think the people responsible for maintaining TensorFlow are going to shut up shop just because PyTorch is modestly more popular.

2

OutrageousSundae8270 t1_j5g1x5q wrote

Um, I don't think TF2 is reaching EOL anytime soon? Do you have any other sources besides a blog post regarding this?

Try both frameworks and pick the one that is more intuitive for you, you can always circle back and learn the other if you need anyway.

2

mining4goldwinsmith t1_j58xmyo wrote

I agree that it is wrong to learn something for the sake of padding your resume, I do think there is some value in pytorch and tensorflow, if you need to use it, but tensorflow is owned by google, so unless you directly benefit from google stock it is not worth adding something else from the google ecosystem into you repertoire. I personally had to learn tensorflow and pytorch due to a degree and I hated being forced to use, tensorflow, google collab and kaggle in one class, when another prof was showing us how to escape the google ecosystem using jupyter, etc. that being said I have used plenty of both frameworks not just for a job or because “I needed to use them.” Simply to make things that had little commercial value but value to groups of academic professionals who otherwise would not have access to certain tools and will never get the funding to use these things. And for community projects that I made for fun, I did not even know what I could do until I learned these things. Knowledge pursuit is worth it even when there is no monetary gain.

0

lol-its-funny t1_j55ge3m wrote

From 6 months back, also very useful for the future of scaling, time and (traditional) data limits.

https://www.alignmentforum.org/posts/6Fpvch8RR29qLEWNH/chinchilla-s-wild-implications

Basically even the largest model to date, PaLM is very suboptimal by leaning towards WAY more parameters than it’s training data size. In fact there might not be enough data in the world today. Even with infinite data and infinite model sizes there are limits.

Check it out, very interesting compared to recent “more is more” trends.

2

Nater5000 t1_j55c801 wrote

>Are TensorFlow and other ML frameworks worth learning in 2023?

They're worth learning if you need to use them. Otherwise, why bother?

There's a weird sentiment I see frequently on reddit that one progresses their programming abilities by just learning how to use a bunch of different frameworks/libraries/languages/etc. This is just not true, and what you gain from that process becomes increasingly marginal as you progress. You're better off just picking a framework and using it.

To put it another way, if I had to hire an ML dev for a TensorFlow project and I'm interviewing two candidates, one who could recite the TensorFlow docs from heart but has never used it, and another who has only used PyTorch but has worked on plenty of real-world projects, then odds are the latter candidate will easily be the choice. It's really not hard implementing something using a framework you're not familiar with when, you know, you can just read the docs as you need them.

With regards to that article, there was a post about it a few weeks ago, and the comments may be worth reading. Basically, nobody doing serious work is going to invest in some home-grown framework that helps solve some niche problem marginally better than more mature frameworks. The fact that the two leading frameworks, TensorFlow and PyTorch, are supported by Google and Facebook isn't a coincidence.

In any case, your questions aren't really clear. You're asking about learning frameworks, but you haven't really provided any context as to why you want to learn these frameworks. I think if there is no specific context, you'd be fine just sticking with PyTorch. Why fix something that isn't broken?

41

suflaj t1_j557l5p wrote

Initially I knew that the biggest difference between previous approaches was the base network. Previously it was a resnet, now a transformer. The transformer is free to rearrange features. Because classification worked well, I know that it wasn't the features themselves. In fact, even less present classes were solved perfectly. So I suspected it was the arrangement of features, since classification is done by a linear layer, which is also free to permute features however it wants.

Then after trying out every implemented convolutional detector and getting the same results, I was even more suspicious. What nailed it down was tracking how the features changed. Anyways, as I was training the detector more and more I saw that the transformer's pool features changed as well. But when I froze the transformer network weights and tried a different task, performance didn't change in a statistically significant way.

When I looked at the activations I saw that on the transformer part, they do not correlate to the locations spatially. So, based on how CNNs work, I knew that as opposed to resnet-based feature extractors, they're giving shuffled outputs.

And finally, because I observed double descent I called upon previous work that hypothesized that the phenomenon might be the restructuring of the network itself. Because I confirmed that the restructuring happening in the transformer part didn't change the performance, I could hypothesize that the restructuring is likely related to spatial properties. I could not confirm whether it would ever converge or generalize, as the increases were from like 0.40 MAP50 to 0.50 MAP50, while I was contesting 0.93 MAP50 scores that were still quite flawed despite being state of the art. And outside out the metrics it was not that obvious that the performance was so much better - even my mentor said "Wow, it works well". Until I showed him the messed up results.

4

suflaj t1_j5521eb wrote

Well yes and no. The variable manipulation was just to prove that the implementation won't work. I also had to go deeper into the theoretical reasons why it wouldn't work.

This is something you can't (easily) prove with the implementation (you don't even have the guarantee that the implementation is correct), but you can disprove the hypothesis that it is due to a specific component. I used this counterproof as a basis why it is not due to the changed components, but the base network. Then I had to compare 2 different tasks on the same data to prove that poor performance is not tied to the actual base network or subcomponents being too weak, but rather how the information of the base network is used by the subcomponents. Once I proved that the different, but similarly difficult task works, I had proof that it's not the data, nor the modules, but either the task or information flow. I knew the task is not flawed or too hard because smaller networks solved the problem (I was just aiming for better than solved).

Specifically, I argued that transformers don't necessarily feature the spatial bias CNNs have and as such make it harder for the convolutional detectors to work with arbitrarily permuted features. I also showed that with sufficiently prolonged training, the detectors would become better, but I concluded that at that rate, it would be more viable to pretrain everything from scratch, for what I didn't have the budget.

I also confirmed double descent behaviour, which made all of this out of scope for my graduate thesis. Consult with your mentor/colleagues to make sure you're not going out of scope, either.

4

No_Possibility_7588 OP t1_j5515hg wrote

Right, thanks for your input! So what you're saying is, you manipulated all sort of possible confounding variables (hyperparameters, detectors, etc.) and concluded that it had to be related to the model's architecture. Which I guess is similar to what I was suggesting in my post, right? Changing the number of landmarks, changing the number of distractors, etc., and noticing whether the same result holds

1

suflaj t1_j54vkhl wrote

Well you would at minimum need to explain why it didn't meet your expectations. You need to elaborate on what grounds you hypothesized what you hypothesized, and why that was a wrong basis or elaborate on what happened that you didn't predict would.

I also, ex., assumed that vision transformers would get better performance on the task I had. But when they didn't (they were sometimes outperformed by YOLO v1), I investigated why, and laid out the proof why it was not human error (aside from my judgement), as well as suggestions on how to proceed next. To do that I rerun the experiment many times, changed hyperparameters, swapped out detectors, all to narrow down that it wasn't actually the inadequate settings, but the arch and specific model themselves.

6