Live data from Hacker News

Microsoft Cognitive Toolkit 2.0

microsoft.com

41–50 of 53 posts

Re: Microsoft Cognitive Toolkit 2.0

#41
Cool! It's too bad about the cuDNN comparison bit people mention (as with dgacmu, I contend that all frameworks now devolve into the low level kernel used), but I'm both impressed by the release and appreciate all the Microsoft folks clearly disclaiming their affiliation.

Disclosure: I work on Google Cloud (but not directly in/on TensorFlow).

Re: Microsoft Cognitive Toolkit 2.0

#42
I am new to Machine Learning, but fairly confident with programming.

I have an Electrical Engineering degree and am good at math ( Math is a passion for me).

I am extremely interested in ML and would like to start by doing stuff, rather than theoretical aspects.

With the material so far that I have read on ML, there seems to be a huge number of variables governing the outcome of a particular method / algorithm (no. of data points, no. of learning iterations, etc)

If I had to pick up a toolkit for get started with ML, is this a good one ? (I am aware of scikit-learn, Tensor Flow, etc).

If this is the one, what book/books can I keep as a reference while working with the toolkit?

I usually select a project, work out the human-machine interaction (UI, backend stuff, etc) on a functional level and then select a stack for implementing the project. I also change the functional aspects of my original design if the stack I have selected offers some commonly used functions.

My initial project is to develop a machine learning system that can detect various QR codes in an image and get their contents.

Re: Microsoft Cognitive Toolkit 2.0

#43

I am new to Machine Learning, but fairly confident with programming. I have an Electrical Engineering degree and am good at math ( Math is a passion for me). I am extremely interested in ML and would like to start by doing stuff, rather than theoretical aspects. With the material so far that I have read on ML, there seems to be a huge number of variables governing the outcome of a particular method / algorithm (no. o…

On what level do you want to develop and understand the system? If you work directly with Theano/TensorFlow/CNTK/MXNet, you are pretty low-level. You more or less write down the formulas from papers / books, you let the framework take the gradient of some loss, and you take care of everything, like updating the parameters according to some update rule / optimization method like SGD. See some of the tutorials of those frameworks and just decide on your own what you prefer.

If you want to go more high-level, use sth like Keras. You define your network structure as a series of layer types, or maybe in other ways, and it does most of the logic for you, and has already implemented most the commonly used Deep Learning techniques. So you concentrate more on the network structure, about what techniques you want to use, etc. And Keras actually supports several backends such as Theano and TensorFlow and CNTK is work-in-progress, although as a user, you won't notice so much difference, except that maybe one backend is faster than the other or does not support some specific functionality or so.

Re: Microsoft Cognitive Toolkit 2.0

#44

I am new to Machine Learning, but fairly confident with programming. I have an Electrical Engineering degree and am good at math ( Math is a passion for me). I am extremely interested in ML and would like to start by doing stuff, rather than theoretical aspects. With the material so far that I have read on ML, there seems to be a huge number of variables governing the outcome of a particular method / algorithm (no. o…

On what level do you want to develop and understand the system? If you work directly with Theano/TensorFlow/CNTK/MXNet, you are pretty low-level. You more or less write down the formulas from papers / books, you let the framework take the gradient of some loss, and you take care of everything, like updating the parameters according to some update rule / optimization method like SGD. See some of the tutorials of those…

Thanks a lot for your suggestion. Never heard of keras, will check it out.

Since I have a pre-set project at hand, I want to use the system first, so as per your suggestion, I'll go with keras.

However, I want to understand the system at a deeper level, purely as a curiosity.

Re: Microsoft Cognitive Toolkit 2.0

#45
post #36

Earlier quoted context omitted.

This is baloney. In fact, it's offensive baloney. There is one TensorFlow. The differences between using TF internally and externally have primarily to do with which RPC bindings it uses (the external one uses gRPC, which is open-source, and the internal one uses the internal RPC framework, which is tied in with all of the internal cluster stuff and authentication and whatnot), and things like filesystems that only e…

Scalability is part of TensorFlow's claimed advantages. If someone adopts TF on their own cluster, would they get the same scalability story as marketed? Disclaimer: I work at Microsoft.

Martin already replied, but to provide a bit more detail, the benchmark results published at: https://www.tensorflow.org/performance/benchmarks

are generated using GCP, AWS, and an NVidia DGX-1, all using exactly the capabilities any ordinary user has on those platforms. The K80 distributed training results are AWS.

There's also a very useful set of suggestions for how to tune TensorFlow for best performance both, and scripts that repeat the benchmarking results: https://www.tensorflow.org/performance/

I see that since my comment, Microsoft has updated the claims in the cited page. It's still not true that there are two versions, but I'm glad you're trying to provide more detail. I'd like to stick a big [citation needed] on the claim that the internal version is much faster.

At the time Mu Li did his performance analysis of MXnet vs Tensorflow, we hypothesized that gRPC overhead was one of the reasons that MXnet was showing better scaling numbers than TF. That turns out to not have been very correct - there were several things that the TF team identified that closed the scalability gap to a pretty narrow degree around the 1.0 release. I don't feel confident that gRPC is much of an impediment to scalability. (I'm also not saying that it isn't -- just that I don't think there's a lot of evidence one way or another).

I'd love it if the CNTK team or someone else were to publish high-quality, head-to-head scalability numbers using the best practices and scripts identified in the TensorFlow performance guide, and using the equivalent CNTK best practices. It benefits everyone when Microsoft and Google work hard to out-do each other. :) (And throw in MXNet as well, with Amazon's best guidance.)

Re: Microsoft Cognitive Toolkit 2.0

#46
post #45

Earlier quoted context omitted.

Scalability is part of TensorFlow's claimed advantages. If someone adopts TF on their own cluster, would they get the same scalability story as marketed? Disclaimer: I work at Microsoft.

Martin already replied, but to provide a bit more detail, the benchmark results published at: https://www.tensorflow.org/performance/benchmarks are generated using GCP, AWS, and an NVidia DGX-1, all using exactly the capabilities any ordinary user has on those platforms. The K80 distributed training results are AWS. There's also a very useful set of suggestions for how to tune TensorFlow for best performance both, an…

Thanks for the clarification. gRPC is slow. We have in-house experiments showing on RDMA-capable networks an optimized implementation can achieve significant speed up over gRPC. And I bet Google's internal version is even faster.

MxNet has a highly efficient network stack that's open source; Caffe2 uses gloo, which is open source; CNTK primarily uses Open MPI, NCCL and soon NCCL2.0. I think it's fair that Google also open source the internal network stack because it is the key to scaling.

Most convolutional networks are not a stress test for scaling because the model size/computation ratio is too low. Use a speech model that has many fully connected layers, or VGG16/19, the communication cost will dominate, and that's when CNTK's 1-bit SGD and Block Momentum really shine.

Again, I work at Microsoft.

Re: Microsoft Cognitive Toolkit 2.0

#47

I am new to Machine Learning, but fairly confident with programming. I have an Electrical Engineering degree and am good at math ( Math is a passion for me). I am extremely interested in ML and would like to start by doing stuff, rather than theoretical aspects. With the material so far that I have read on ML, there seems to be a huge number of variables governing the outcome of a particular method / algorithm (no. o…

Would recommend using Tensorflow instead. TF already has 59k stars in GitHub and is going to be easier to find answers to questions and find tutorials, books, etc. Would say TF is already close to being the canonical ML framework. Think MS was just too late.

Re: Microsoft Cognitive Toolkit 2.0

#48
post #45

Earlier quoted context omitted.

Martin already replied, but to provide a bit more detail, the benchmark results published at: https://www.tensorflow.org/performance/benchmarks are generated using GCP, AWS, and an NVidia DGX-1, all using exactly the capabilities any ordinary user has on those platforms. The K80 distributed training results are AWS. There's also a very useful set of suggestions for how to tune TensorFlow for best performance both, an…

Thanks for the clarification. gRPC is slow. We have in-house experiments showing on RDMA-capable networks an optimized implementation can achieve significant speed up over gRPC. And I bet Google's internal version is even faster. MxNet has a highly efficient network stack that's open source; Caffe2 uses gloo, which is open source; CNTK primarily uses Open MPI, NCCL and soon NCCL2.0. I think it's fair that Google also…

Publish those results? It'd be very interesting to see. And, it sounds like you think there are benchmarks missing from the existing common set of things people are measuring -- what's a very specific network you'd like to see added to the mix? VGG16 doesn't fall into my radar of "modern and applicable" in the days of ResNet.

Using NCCL is great; TF now supports it, as of about a month and a half ago (though I don't know how tightly integrated it is): https://github.com/tensorflow/tensorflow/blob/master/tensorf...

From the benchmarks available, and not knowing what your in-house experiments show, I don't believe that the "internal network stack" is key to scaling. The scalability numbers shown on tensorflow.org/performance are very reasonable: From 902 images/sec to 1783 (1.97x) going from 32->64 K80 GPUs on Amazon for Inception v3, and 565->981 (1.7x) for ResNet-512. I'd love to be proved wrong.

That 1.7x scaling on ResNet-512 would be a great point of comparison, for example. From my student Hyeontaek's results, I actually suspect that there are scheduling improvements that could make up some of that difference, not networking improvements.

As I'm sure you know, of course, and are just fishing for, the reason that code links against gRPC externally is because trying to extract Google's internal networking code from the full internal software codebase would be ridiculous. I think it's far more likely to see the other direction, with everything settling on gRPC -- gRPC is actually newer, and in general, more feature-ful, than Stubby: https://cloudplatform.googleblog.com/2016/08/gRPC-a-true-Int...

Re: Microsoft Cognitive Toolkit 2.0

#49
post #35

Earlier quoted context omitted.

I did not know the below situation with tensor flow. MS contributions to OSS, at least in this instant, appear a lot more transparent and not-self-centered, compared to Google's "...It was made very clear from the first day of TensorFlow’s announcement, that Google created two TensorFlow versions: a public version and an internal version. As a TensorFlow user, one either must tolerate the slow speed of the public ver…

I think that part is misleading. Vijay Vasudevan (a member of the TensorFlow team) has repeatedly put down the notion that the internal TensorFlow code is significantly different than what we see: https://www.reddit.com/r/MachineLearning/comments/696dzy/d_i... Obviously, this is taking the word of someone who is incentivized to get as many people using TF as possible, but I haven't been given a reason to not believe…

Thanks for mentioning that Sam, I appreciate it. Speaking for just myself:

I personally don't care what tools or frameworks people use to get work done and have repeatedly suggested people use whatever works best for them.

It also wouldn't make any sense to hoard any good stuff internally if we wanted to provide a useful framework that people wanted to use externally.

We actually don't have a huge amount of tooling internally that we hold back. The only tooling I really use is the [timeline](https://github.com/tensorflow/tensorflow/blob/f488419cd6d925...) for debugging performance (not the EEG tool in the whitepaper, I've never used it). That's available externally though, as you can see.

On some of the comments in this thread in general, I'm pretty sad at the lack of scientific rigor in the community, and that goes for any person who publishes code that differs from the results they claim, regardless of affiliation. I am happy about projects like OpenAI's RL baselines, as I know others are too.

Most of the papers and articles comparing performance of frameworks have lots of bugs and aren't even comparing the same model computation between frameworks. In fact, CNTK's article points to an external benchmark showing CNTK in a good light, but those benchmarks have bugs in them rendering the comparison incorrect (we've been sending PRs to fix them). I find it disappointing that the culture of the organization promotes calling others out for being 'irresponsible' except when it suits them.

The TensorFlow team hasn't published many articles comparing performance directly to others because it's honestly a lot of hard work to verify that you are comparing fairly. Of course, I do think TensorFlow needs to improve performance out of the box for people, and the team is working on that.

Re: Microsoft Cognitive Toolkit 2.0

#50
post #49
post #35

Earlier quoted context omitted.

I think that part is misleading. Vijay Vasudevan (a member of the TensorFlow team) has repeatedly put down the notion that the internal TensorFlow code is significantly different than what we see: https://www.reddit.com/r/MachineLearning/comments/696dzy/d_i... Obviously, this is taking the word of someone who is incentivized to get as many people using TF as possible, but I haven't been given a reason to not believe…

Thanks for mentioning that Sam, I appreciate it. Speaking for just myself: I personally don't care what tools or frameworks people use to get work done and have repeatedly suggested people use whatever works best for them. It also wouldn't make any sense to hoard any good stuff internally if we wanted to provide a useful framework that people wanted to use externally. We actually don't have a huge amount of tooling i…

Thanks for the response, Vijay. I didn't mean to insinuate that I thought the team was holding back tooling for the public (rather that such tooling wouldn't make sense to release), but it's reassuring to hear that the total TensorFlow experience is pretty much the same internally and externally.

I think part of the conspiracy theorizing is due to the misconceived notion that Google has some "secret sauce" that allows it to do what it does, as opposed to many talented engineers spending a lot of man-hours on a problem. There has also been a fair amount of negative Google sentiment in the community recently, and the story that Google is holding out on developers feeds into this narrative.

Benchmarking has always been low-hanging fruit for community members to latch onto for the sake of attacking/defending a particular framework. However, the practical difference between these frameworks (assuming each is configured properly) seem to be within a margin of error and are constantly changing (not to mention the inconsistencies you mentioned), so choosing a framework solely on its benchmarking scores is narrow-minded.

From what I've seen, benchmarking has been more useful as a discovery mechanism for areas in a codebase that can be improved. The TensorFlow team has done an excellent job of using various benchmarks to guide development, and I imagine other frameworks are doing the same.

Post reply on HN