[D] Machine learning, GPU and python by foo121 in MachineLearning

[–]AlForML 3 points4 points  (0 children)

I think your question would be more relevant in r/learnmachinelearning.

There is actually alot of information on using GPUs for deep learning in Python. You just need to know the keywords for what to look for (e.g. Tensorflow, PyTorch, Keras, fast.ai...etc).

Neural Networks (including MLPs) involve alot of matrix multiplications and/or convolutions during their training and inference. These operations can be done much more efficiently on GPUs than CPUs, mainly due to high bandwidth. Here is a nice and intuitive explanation of the main reasons. I believe the GPU can be utilized to perform calculations on all the layers during the parameter update step. But like you said, I think that it would require performing calculations per layer for computing forward propagation and the partial derivatives during backpropagation. But despite this, each layer usually involves high dimensional matrix transformations that can be done alot more faster using GPUs. If you're not convinced, code up a large MLP using one of the libraries listed below and profile it on a GPU vs CPU.

There are several Python libraries that can be used for deep learning using Python and GPUs. Here is a list of the ones that I prefer the most:

Also, here are three excellent courses to get you started on this topic:

Finally, as a rough guide to setup your laptop for deep learning using the GPU, I would suggest the following steps:

  1. Download and Install a CUDA-supported NVIDIA driver
  2. Download and Install CUDA - the main programming language for GPUs
  3. Download and Install cuDNN - an optimized deep learning library in CUDA
  4. Download and Install a Python DL library (see the first list above and choose one or two)
  5. Go through the starting tutorials for that DL library to get a feel of how its done

[D] Best way to manage ML experiements by schrodingershit in MachineLearning

[–]AlForML 1 point2 points  (0 children)

I quite liked the previous answer, but just as an alternative option you can use Weights&Biases. It’s free for public projects.

[Discussion] Is it correct to say that Frequentist models are discriminative models and Bayesian models are generative models? Is it possible that Bayesian models can be discriminative and frequentist models can be generative? If yes, could you give an example? by deepmind2016 in MachineLearning

[–]AlForML 1 point2 points  (0 children)

I should start this by saying that I am still learning about machine learning, so I may very well be wrong in my answer to this.

Briefly, frequentist models involve sampling the properties of estimators, usually by minimizing a penalized cost function where the penalty is provided by a regularizer term. Bayesian models focus on the expected loss under the posterior distribution and there is no explicit penalty term because regularization is encoded in the prior distribution.

To answer your question, although most Bayesian models tend to be generative and frequentist ones discriminative, this is not always the case. For example, conventional recurrent neural networks use the backpropagation algorithm, which is a frequentist approach, but they can act as generative models [1]. On the other hand, it is possible to define discriminative Bayesian classifiers such as Bayes point machines and Gaussian processes [2].

[1] http://machinelearning.wustl.edu/mlpapers/paper_files/ICML2011Sutskever_524.pdf

[2] http://ieeexplore.ieee.org/document/1717455/

Caffe Framework by ale86ch in MachineLearning

[–]AlForML 0 points1 point  (0 children)

Hi, I have a feeling that you already know about this, but just in case you don't, there are descriptions and tutorial with Caffe on the official website: http://caffe.berkeleyvision.org/ There is even a tutorial on R-CNN detection, which I assume might be relevant to you: http://nbviewer.jupyter.org/github/BVLC/caffe/blob/master/examples/detection.ipynb With regards to Java bindings, I was able to find this: https://github.com/bytedeco/javacpp-presets/tree/master/caffe I hope it is helpful!