Live data from Hacker News

The State of Machine Learning Frameworks

thegradient.pub

131–140 of 201 posts

Re: The State of Machine Learning Frameworks

#131

That first graph is super-confusing. The Y axis says "Percentage of unique mentions" but it only goes up to 0.7%? Was it meant to be "Fraction of unique mentions". And then the title is "PyTorch vs Tensorflow", but it never says whether the Y axis is unique mentions of PyTorch or Tensorflow? From the context I guess PyTorch, but come on! The Y axis should be "Fraction mentioning PyTorch", and the title should be "Pap…

Oh shit, you're right.

I fixed these properly at some point, but I made some last minute modifications to the text size and such.

These interactive figures are probably a bit better overall too: https://chillee.github.io/pytorch-vs-tensorflow/

I'll change that ASAP. Thanks for the heads up!

EDIT: Fixed! Lemme know if that addressed your issues.

Re: The State of Machine Learning Frameworks

#132
post #109

Is anyone here using Gorgonia? I’m working in a Go code base and I’m thinking of using it instead of creating a separate service in Python. https://gorgonia.org/

Isn't it a bit cumbersome working in Go for this kind of stuff? Not judging, just asking.

Re: The State of Machine Learning Frameworks

#134
post #15

In my experience in computer vision research it doesn’t matter what you use, yes, immediate mode is slightly more convenient, but research time is influenced much more by your computing power, dataset acqusition/labeling/relabeling power and, last but not the least, by code quality and easy and efficient collaboration - thats why you need tools like DVC/Argoproj. We did get amazing results using Caffe v1 back in the…

I agree. I haven’t encountered a strong preference in academic computer vision or machine learning. Keras and PyTorch, dominate, of course, but I wouldn’t be shocked if everyone started using something new in the future.

Re: The State of Machine Learning Frameworks

#135

We use Pytorch extensively in our startup. We tackle a lot of new research problems as consultants/partners to help develop products or devise new algorithms/models to solve tasks for our customers. We have never regretted our choice to pick Pytorch. I found the article pretty spot on when comparing Tensorflow and Pytorch. The things that have appealed to me about Pytorch are: 1. Extremely easy to debug and work with…

Last year I was tasked with looking into a NAS (Neural Architectures Search) paper and analyzing the algorithm. The paper came with a TensorFLow implementation. Trying to read that TF code was quite difficult. I searched around and found a PyTorch implementation - much easier to read and understand, and it ran about 50% faster as well (the latter was a bit surprising). I tend to think that TensorFlow lends itself to…

What made me fall in love with PyTorch was also that the "neural network training process" is defined almost as it is in theory, in code in PyTorch

- loop through epochs

- loop through each batch

- run a forward pass for the batch ( model(batch) )

- calculate the loss for the batch ( criteria(y, yprim)

- compute the gradients/backprop ( loss.backward() )

- update the weights (optimizer.step())

This really enforced everything I learned and I think breaks down the problem. All this of course in addition to everything else already mentioned, and super convenient module/network building and definition.

Re: The State of Machine Learning Frameworks

#136

What about unique mentions of keras and/or tensorflow? I'm wondering if papers mention keras only and don't mention tensorflow at all.

I talk about this in the "ablation" section/appendix.

https://thegradient.pub/p/cef6dd26-f952-4265-a2bc-f8bfb9eb1e...

Re: The State of Machine Learning Frameworks

#137

I have worked as data scientist on a lot of finance domain problems - forecasting default, fraud, conversion probability ect. Lightgbm library has consistently performed well. I've been interested in how many colleagues instantly jump to neural nets when in my experience this often doesn't beat lightgbm on medium sized datasets not related to text/images.

Our team has a similar experience using xgboost and catboost. Models perform great and beat (our) neural nets

Re: The State of Machine Learning Frameworks

#138

Earlier quoted context omitted.

Yup, you make some great points and I couldn't agree more. Very recently, I was looking into training an object-detector for a custom problem with not many training examples. One of the classes (hardest one to train from few examples) was "person". I was able to create a custom detection network for a 3-class problem, load up the COCO pretrained weights for the network, strip out all the other weights at the "head" f…

how did you strip out weighs for other classes? what does that even mean?

So this will depend a bit on the architecture (I was working with CenterNet). In my situation, the final feature maps for each class are all obtained by a series of network "heads" that perform a set of convolutions on the same set of slightly deeper set of featuremaps. Each convolutional "head" is responsible for object-detections for a single class. So in the case of COCO, if you have 80 classes, you have 80 such heads. In this situation, if I wanted to create a new CenterNet model that predicted (let's say) the following 3 classes: "person", "teapot" and "donkey", only the class "person" exists in COCO and I already have a wonderfully robust person detector if I can utilize the person detecting weights from the COCO model.

So what I can do is, that I can instantiate a CenterNet model of identical architecture, except with only 3 heads for the 3 classes instead of 80 heads for the 80 COCO classes. Now, when I try to load the COCO weights in, there will be a mismatch and typically you end up with the heads being left with their default initialization while the rest of the backbone gets the COCO weights... this is the traditional way you do transfer learning on related problems because you are still starting off with a much better set of weights for your entire network backbone than random weights, which will help with training on related tasks.

However, we can go a step further and load up the state_dict from the COCO weights file, figure out which set of weights are for the "person" head and assign them to let's say the 1st of your 3 heads in your new architecture. You can even go a step further... Since the "donkey" class is quite similar to the "horse" class in COCO, you could also transfer the weights for the "horse" head in the COCO weights to your 2nd head. So now you have a network with 2 of the 3 heads already set up to be robust person and horse detectors. These are much better poised to then be fine-tuned on your application specific data for examples of people and donkeys. You end up with a model that is much more robust on those 2 classes despite only having (let's say) a couple of hundred labeled images for your specific application.

Hope all of this made sense. It's just nice that in Pytorch, everything is pretty straightforward and weights are just dicts and it's super easy to introspect them and splice them, etc.

Re: The State of Machine Learning Frameworks

#139

We use Pytorch extensively in our startup. We tackle a lot of new research problems as consultants/partners to help develop products or devise new algorithms/models to solve tasks for our customers. We have never regretted our choice to pick Pytorch. I found the article pretty spot on when comparing Tensorflow and Pytorch. The things that have appealed to me about Pytorch are: 1. Extremely easy to debug and work with…

What does your start up do?

Re: The State of Machine Learning Frameworks

#140

We use Pytorch extensively in our startup. We tackle a lot of new research problems as consultants/partners to help develop products or devise new algorithms/models to solve tasks for our customers. We have never regretted our choice to pick Pytorch. I found the article pretty spot on when comparing Tensorflow and Pytorch. The things that have appealed to me about Pytorch are: 1. Extremely easy to debug and work with…

Agreed, but projects like Cortex are narrowing the gap around deployment imo https://github.com/cortexlabs/cortex

For a moment there I thought you might be referring to https://github.com/thinktopic/cortex
Post reply on HN