1. 程式人生 > >Ask HN: Whats the best way to learn C++ for Deep learning?

Ask HN: Whats the best way to learn C++ for Deep learning?

What is your reason for learning "C++ for deep learning"?

This will kind of define how to go about doing it.

I can think of a few different reasons you might want to do this:

* You DL code in another framework is slow, and you have some custom C++ you want to write to speed it up. For this, you probably want to learn both high performance C++ and/or CUDA kernel development. You can probably avoid diving completely into C++, and just call a couple of optimized routines from python (and whatever other deep learning framework you are using in python). In this case, it might be worth looking into Tensor Comprehensions.

* You are taking someone elses DL algorithm and moving it to C++. In this case, you still don't need to be diving too much into C++, Ideally, you probably want to use something like ONNX and Caffe, and then call into them with some python wrapper. If you want the whole thing to be in C++, then you are still going to use something like ONNX and Caffe, but you will be writing mostly application code to support it.

* You want to help with the development of Pytorch, Tensorflow, Caffe or anther deep learning framework. In this case, you need to know CUDA kernel development, performant C++ idioms, and good C++ application development idioms.

These are pretty different flavors of C++, which makes it hard to give you a good answer.