Live data from Hacker News

Microsoft Cognitive Toolkit 2.0

microsoft.com

21–30 of 53 posts

Re: Microsoft Cognitive Toolkit 2.0

#21
post #5

Wow, adding Keras support is really slick! It's nice to be able to use Keras with a few different back ends.

And they also have builtin support for 1-bit SGD. Compresses a model "down to 1 bit per weight" [0]. Seems to be a general technique for model compression, but it's nice for deployment to have it built in. This also doesn't seem to be a new addition to CNTK, just something I didn't know before. [0] https://www.microsoft.com/en-us/research/publication/1-bit-s...

There's actually two 1-bit things going on with CNTK 2.0.

One is the 1-bit SGD that has long been in CNTK and has been criticized for its weird license. I am not a lawyer, but my understanding is it says something like you cannot use this unless you call it from inside CNTK. The terms are not that bad and you don't have to use 1-bit SGD if you don't like them.

CNTK 2.0 has another 1-bit thing going on as well which is binary convolution. This uses the Halide compiler to generate code that is 10x faster than optimized 32-bit convolution. This still seems to be at a proof of concept stage.

Disclaimer: I work at Microsoft.

Re: Microsoft Cognitive Toolkit 2.0

#22
post #17

Earlier quoted context omitted.

I actually did take a data mining course a couple years ago in uni, and also at the time I was following Andrew Ng's course. TBH, I learn better by working on a project. Otherwise I lose interest midway.

If a course is of interest, we will be launching a deep learning course shortly that would help bridge the gaps. Stay tuned. I am a Microsoft employee.

Will this be based on Azure notebooks or otherwise cloud based + free?

Re: Microsoft Cognitive Toolkit 2.0

#23
post #17

Earlier quoted context omitted.

If a course is of interest, we will be launching a deep learning course shortly that would help bridge the gaps. Stay tuned. I am a Microsoft employee.

Will this be based on Azure notebooks or otherwise cloud based + free?

We are working through the details. It will follow the standard MOOC like Coursera, Edx, Udacity. You should be able to use the Azure Notebook (that is the goal) but there may be small caveats. Stay tuned as we work through the details.

Re: Microsoft Cognitive Toolkit 2.0

#24

They refer to this benchmark in the blog post - http://dlbench.comp.hkbu.edu.hk/ There is also the v7 benchmark done on a lot more hardware and where tensorflow fares a bit better - http://dlbench.comp.hkbu.edu.hk/?v=v7 Does anyone know whether TF had a performance regression between v0.11 and v1.0 or if it was just lucky on benchmark v7 and unlucky on v8? Also, how does CNTK manage to be that much better than anyone…

CNTKs roots are from Speech type data which inherently have a notion of time. The architecture of the toolkit support efficient recurrence from ground up. Also the toolkit focusses on handling large production scale data workloads which implies additional engineering efficiencies built into the toolkit. I am a Microsoft employee.

Re: Microsoft Cognitive Toolkit 2.0

#26
post #23

Earlier quoted context omitted.

Will this be based on Azure notebooks or otherwise cloud based + free?

We are working through the details. It will follow the standard MOOC like Coursera, Edx, Udacity. You should be able to use the Azure Notebook (that is the goal) but there may be small caveats. Stay tuned as we work through the details.

This sounds awesome, thankyou for doing this! Is there anywhere I can give my email to get updates/a date I can put a reminder in my calendar to check this out?

Re: Microsoft Cognitive Toolkit 2.0

#27
> After training a model using either Python or BrainScript, Cognitive Toolkit had always provided many ways to evaluate the model in either Python, BrainScript, or C#

Glad to see Frank Seide (and others I guess?) are still working on that!

Re: Microsoft Cognitive Toolkit 2.0

#28

They refer to this benchmark in the blog post - http://dlbench.comp.hkbu.edu.hk/ There is also the v7 benchmark done on a lot more hardware and where tensorflow fares a bit better - http://dlbench.comp.hkbu.edu.hk/?v=v7 Does anyone know whether TF had a performance regression between v0.11 and v1.0 or if it was just lucky on benchmark v7 and unlucky on v8? Also, how does CNTK manage to be that much better than anyone…

CNTK uses the LSTM implementation by CuDNN in their official LSTM layer.

TensorFlow has multiple LSTM implementations, such as LSTMCell, BasicLSTMCell, LSTMBlockCell, and also one wrapper for CuDNN, and maybe more. I'm quite confident that in this benchmark, for TensorFlow, they did not use the CuDNN wrapper, which is a bit unfair I would say. Although the CuDNN wrapper in TensorFlow does not support sequences of different lengths but you could overcome this by just ignoring the non-used frames. See here for some more details:

https://stackoverflow.com/questions/41461670/cudnnrnnforward...

Note that you could also provide your own LSTM kernel for TensorFlow, which is what we do in our framework, and then you can get really fast, although our benchmarks are a bit outdated.

https://github.com/rwth-i6/returnn

Re: Microsoft Cognitive Toolkit 2.0

#29

The important feature is Keras compatability (although it doesn't seem to be in the official repo yet: https://github.com/fchollet/keras/pull/6800 ) In terms of "how is CNTK better than TensorFlow," CNTK trains 5-10x faster at minimum on pre-2.0 LSTM benchmarks, which is big since LSTMs are used for a lot nowadays. ( https://arxiv.org/abs/1608.07249 )

This is because they use the CuDNN LSTM kernel in CNTK and in TensorFlow they chose to not use the CuDNN LSTM kernel which might be a bit unfair because they could have used it. The same for Torch. See here for more details: https://news.ycombinator.com/item?id=14473234

Re: Microsoft Cognitive Toolkit 2.0

#30
I think their comparison is a bit unfair.

> Speed. CNTK is in general much faster than TensorFlow, and it can be 5-10x faster on recurrent networks.

This is because they use the CuDNN LSTM kernel but for the TensorFlow comparison they probably did not use the CuDNN LSTM kernel in TensorFlow. See here for some more details: https://news.ycombinator.com/item?id=14473234

> Accuracy. CNTK can be used to train deep learning models with state-of-the-art accuracy.

As well as all other frameworks can do.

> API design. CNTK has a very powerful C++ API, and it also has both low-level and easy to use high-level Python APIs that are designed with a functional programming paradigm.

TensorFlow also has a C++ API.

> Scalability. CNTK can be easily scaled over thousands of GPUs.

Like TensorFlow.

> Inference. CNTK has C#/.NET/Java inference support that makes it easy to integrate CNTK evaluation into user applications.

TensorFlow also has many bindings for other languages.

> Extensibility. CNTK can be easily extended from Python for layers and learners.

TensorFlow can very easily be extended. I did that a lot in our framework (https://github.com/rwth-i6/returnn).

> Built-in readers. CNTK has efficient built in data readers that also support distributed learning.

Just like TensorFlow.

> Identical internal and external toolkit. You would not be compromised in any way because the same toolkit is used by internal product groups at Microsoft.

Ok, maybe here they are better in some sense, although I am not sure that the Google internal version of TensorFlow differs so much. As far as I know, it just has some stuff added for their data centers, for TPU, etc.

Also, the licence of 1-bit SGD is strange in CNTK. Not sure what the state about this is. Last time you could not really use that.

I don't want to downplay CNTK. I really like it. I think it's great that they have really good working CuDNN LSTM wrappers in their default LSTM implementation, and it's better than all the other wrappers (see here: https://stackoverflow.com/questions/41461670/cudnnrnnforward...). The team behind CNTK is really strong. So thank you and congratulation for releasing CNTK 2.0!

Post reply on HN