Random stuff

A new paper Reinforcement Learning, Fast and Slow from DeepMind reviews recent techniques and improvements in deep Reinforcement Learning. This paper talks about eposodic-RL, meta-RL and its combination. A paper on technology that can translate neural activity into speech. Mind-blowing. Style transfer is such an interesting topic. The seminal paper on this is from the Bethge Lab and is titled A Neural Algorithm of Artistic Style. A summary article is here.

May 3, 2019 · 1 min · Bharath

Decision Trees

This is a short post on decision trees based on my reading of Chapter 6 of Hands–On Machine Learning with Scikit–Learn and TensorFlow . I am just listing out some interesting points. The book is really good; so please refer to it. Basics Decision trees do not require much data preparation (feature scaling, centering etc). Gini score indicates impurity of a decision tree node (do all training examples belong to a single class or not) CART algorithm to produce a decision tree produces binary trees. ID3 produces trees whose nodes can have more than 2 children. Decision trees are white box models because it is easy to see why the decisions were made. Neural networks / Random forests are black box because of the lack of interpretability. Decision trees are very easy to apply manually. ...

April 22, 2019 · 2 min · Bharath

Playing with LSTM

I was trying to learn the basics of LSTM and found this pytorch tutorial. Starting from there I tried out the parts-of-speech tagger with minor modifications. 1. Import the necessary libraries import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import numpy as np torch.manual_seed(1) ...

April 20, 2019 · 3 min · Bharath

Summary of a blog post by Kyunghyun Cho

Kyunghyun Cho had written (in 2015) a blog post titled Brief Summary of the Panel Discussion at DL Workshop @ICML 2015. I found the post interesting and below is a quick summary. The panelists talked about the following topics as the future of deep learning. Deep learning for NLP Unsupervised learning Medical image analysis Drug discovery Q&A systems Sequential decision making DL for Non-cognitive tasks Also there was some content about AI hype, General AI, academia vs industry etc.

April 19, 2019 · 1 min · Bharath

Video summary: Adaptive Communication Strategies in Local-Update SGD

This is a summary of the video Adaptive Communication Strategies in Local-Update SGD from SysML 2019 conference. Datasets as well as ML models are becoming larger. So SGD on a single machine is slow. Generally we need to optimise Error Convergence (actual training progress per iteration). But in a distributed setting we also need to optimise System Throughput (iterations per unit of wall-clock time). Ideally we need to focus on both (actually the product of the two, which is training progress per unit of wall-clock time). ...

April 19, 2019 · 2 min · Bharath

Paper summary: Document Expansion by Query Prediction

This is a short summary of the paper Document Expansion by Query Prediction by Rodrigo Nogueira, Wei Yang, Jimmy Lin, and Kyunghyun Cho. When a search engine wants to find a document, it uses its index. The costly parts of the ranking algorithm are usually implemented as re-rankers which take the top-n search results and then reorder them (or re-rank them). This paper has a doc2query ML model which takes a document and comes up with queries which are well answered by the document. Then the query is attached to the document as metadata. ...

April 19, 2019 · 1 min · Bharath

Alternatives to SGD

Mini-batch SGD has been the mainstay of algorithms to optimise the cost function in neural networks. But there are multiple alternatives. Hessian optimization Momentum based techniques BFGS and its variants Nesterov’s accelerated gradient … ...

March 5, 2019 · 2 min · Bharath

GPU: CUDA architecture

CUDA is Nvidia’s initiative to define a programming model and hardware architecture which aims to allow GPUs to be unified with CPUs for compute. There are various aspects of CUDA and we will try to gain an appreciation for it in this article. An application which wants to use GPU for some general purpose compute has to define a kernel function (C interface). This kernel function is run on lots of data elements in parallel. Each GPU can run different kernels, possibly from different applications. One kernel submitted to the GPU runs as a grid. Each grid consists of many thread blocks. Each thread block consists of many threads.

November 2, 2017 · 1 min · Bharath

GPU: Nvidia architectures

GPU microarchitectures: Tesla -> Fermi -> Kepler -> Maxwell -> Pascal -> Volta AWS P3 uses Tesla V100 cards — Volta microarchitecture. AWS G3 uses Tesla M60 cards — Maxwell microarchitecure. AWS G2 uses Tesla GRID K520 cards — Kepler microarchitecture. AWS P2 uses Tesla K80 cards (GK210 GPU) — Kepler microarchitecture. AWS CG1 uses Tesla M2050 cards — Fermi microarchitecture. GCE provides K80 and P100. A tensorcore is a logic circuit which allows 16x16 matrix multiplication followed by addition as a primitive. This speeds up the inner loops of deep learning programs.

November 1, 2017 · 1 min · Bharath

Tensorflow — Simple Transformations

I am trying out stuff from http://learningtensorflow.com/lesson3/ which talks about simple image transformations using tensorflow. I am trying this out in zeppelin + pyspark. %sh wget http://learningtensorflow.com/images/MarshOrchid.jpg readlink -f MarshOrchid.jpg -------------------------------------------------------------------- %pyspark import numpy as np import StringIO import matplotlib matplotlib.use('Agg') # turn off interactive charting so this works for server side SVG rendering from matplotlib import pyplot as plt import matplotlib.image as mpimg def show(p): img = StringIO.StringIO() p.savefig(img, format='svg') img.seek(0) print "%html <div style='width:600px'>" + img.buf + "</div>" -------------------------------------------------------------------- %pyspark plt.clf() filename = “MarshOrchid.jpg” image = mpimg.imread(filename) print (image.shape) tf.reset_default_graph() x = tf.Variable(image, name=”image”) init = tf.initialize_all_variables() with tf.Session(config=config) as sess: rotate1 = tf.transpose(x, perm=[1, 0, 2]) sess.run(init) result1 = sess.run(rotate1) plt.subplot(121) plt.imshow(image) plt.subplot(122) plt.imshow(result1) show(plt)

November 23, 2016 · 1 min · Bharath