Post by Category

BERT (1) Classification (1) Computational Biology (2) Computational Chemistry (2) DeepLearning (21) GAN (1) Graphical Models (4) Graphs (1) Huggingface (1) Keras (2) Kubernetes (1) Machine Learning (1) Memory Networks (1) Message Passing Networks (1) NLP (5) Pytorch (6) Tensorflow (6) rdkit (1)

BERT (1)

Using Roberta classification head for fine-tuning a pre-trained model

April 15, 2021

An example to show how we can use Huggingface Roberta Model for fine-tuning a classification task starting from a pre-trained model. The task involves binary...

Classification (1)

Basic machine learning with python sklearn for classification

March 16, 2014

A demonstration of how to use python package sklearn for a basic machine learning task : classification.

Computational Biology (2)

Encode a protein to a image using Hilbert curves.

April 25, 2019

```python from future import absolute_import from future import division from future import print_function import os import numpy as np import itertools

Graph Convolutions using Protein structures

February 2, 2018

This post shows how to implement a simple graph convolutional deep learning method to predict interfaces between protein residues, i.e. given a pair of inter...

Computational Chemistry (2)

Graph Convolutions to predict Solubility for Molecules

February 15, 2018

This writeup shows how to use graph convolutions for a regression like problem using the DeepChem library.

Simple data feeding to Deepchem framework in tensorflow style

March 22, 2018

Deepchem provides a wonderful framework and library for developing deep learning and machine learning predictive models for small molecules. However, its und...

DeepLearning (21)

Buidling multilayer GPU from single GRU-cells with Pytorch.

September 25, 2020

First use nn.GRU with 3 layers for processing sequences. Then use nn.GRUCell for doing the same.

Comaparing using TimeDistributed and not with dense when return_sequences=True in Keras. The results are identical.

January 16, 2021

```python from future import print_function

Encode a protein to a image using Hilbert curves.

April 25, 2019

```python from future import absolute_import from future import division from future import print_function import os import numpy as np import itertools

Encoding a set of Graphs using Neural Message Passing

January 10, 2019

You will need gpu and cuda with pytorch. Data used in the code

Graph Convolutions to predict Solubility for Molecules

February 15, 2018

This writeup shows how to use graph convolutions for a regression like problem using the DeepChem library.

Graph Convolutions using Protein structures

February 2, 2018

This post shows how to implement a simple graph convolutional deep learning method to predict interfaces between protein residues, i.e. given a pair of inter...

How is cross entropy computed in pytorch ?

January 16, 2021

CROSS ENTROPY LOSS (logits, class) = negative log of softmax of logits[class]

Implementation of End-2-End Memory Network for Language Modeling

October 10, 2018

Tensorflow implementation of End-To-End Memory Networks for the language modeling task. I tried to name the variable as closely as possible to that in the p...

Multinomial (or multiclass) logistic regression (aka softmax regression) with tensorflow

January 1, 2016

Example of solving a parameterized model with Tensorflow - define the logistic regression with multiple classes to predict.

Parameter learning and updates in simple word2vec

August 7, 2016

A lot of materials on word2vec models such as Skipgram and CBOW are available that explain the models really well. This post is just a drop in that ocean try...

Pytorch - simple GRU experiment

February 1, 2021

Create a simple GRU layer using pytorch. Feed a tensor of shape batch_sizexnum_stepsxinput_size and observe the GRU output. Next feed the same input tensor ...

Siamese Network using Pytorch with simulated scatter plot data.

March 28, 2021

FullNotebook for this post

Siamese network in keras to detect pairs of scatter plots that are similar

March 16, 2021

Full Notebook

Simple Generative Adversarial Network

April 1, 2020

Simple Generative Adversarial Network to generate datapoints from a simple one-dimensional function (adapted from https://machinelearningmastery.com/how-to-d...

Simple Named entity Recognition (NER) with tensorflow

January 15, 2017

Given a piece of text, NER seeks to identify named entities in text and classify them into various categories such as names of persons, organizations, locat...

Simple Seq2Seq machine translation using GRU based encoder-decoder architecture

February 1, 2021

Adapted from https://d2l.ai/chapter_recurrent-modern/seq2seq.html

Simple character level LSTM using Keras.

August 31, 2020

Implements simple character level name classification using Keras LSTM and Dense layers. Training is done using about 20K names across 18 languages. The name...

Simple character level LSTM using Pytorch.

August 31, 2020

Implements simple character level name classification using Pytorch. Training is done using about 20K names across 18 languages. The names are clubbed into t...

Simple data feeding to Deepchem framework in tensorflow style

March 22, 2018

Deepchem provides a wonderful framework and library for developing deep learning and machine learning predictive models for small molecules. However, its und...

Tensorflow Recursive Neural Network (ReNN) simple example

September 20, 2016

A simple example demonstrating the use of TensorArray to create a recursive neural network, essentially a tree structured neural network.

Using Roberta classification head for fine-tuning a pre-trained model

April 15, 2021

An example to show how we can use Huggingface Roberta Model for fine-tuning a classification task starting from a pre-trained model. The task involves binary...

GAN (1)

Simple Generative Adversarial Network

April 1, 2020

Simple Generative Adversarial Network to generate datapoints from a simple one-dimensional function (adapted from https://machinelearningmastery.com/how-to-d...

Graphical Models (4)

Denoising Images using Ising model

December 3, 2015

This post develops on the Ising model concepts from my previous blog, see Ising model. Consider the problem of reconstructing a black-and-white image (i.e. e...

Gibbs Random Field (GRF)

November 14, 2015

Lets see what is a GRF and how it is connected to the MRF. If you are new to my blogs, please visit my blog on MRF to get familiar with the notations. A GRF...

Ising Model

November 26, 2015

Please refer to my earlier posts on MRF and GRF for getting used to the notations. If we consider clique potentials for sizes of upto 2, the energy function ...

Markov Random Fields (MRF)

November 1, 2015

A short intro to MRFs. Let \( \textbf{X} =\{ X_1,X_2,…,X_n \} \) be a family of random variables defined on a set \( S=\{1,2,…,n\} \) of sites. As an exampl...

Graphs (1)

Encoding a set of Graphs using Neural Message Passing

January 10, 2019

You will need gpu and cuda with pytorch. Data used in the code

Huggingface (1)

Using Roberta classification head for fine-tuning a pre-trained model

April 15, 2021

An example to show how we can use Huggingface Roberta Model for fine-tuning a classification task starting from a pre-trained model. The task involves binary...

Keras (2)

Siamese network in keras to detect pairs of scatter plots that are similar

March 16, 2021

Full Notebook

Simple Generative Adversarial Network

April 1, 2020

Simple Generative Adversarial Network to generate datapoints from a simple one-dimensional function (adapted from https://machinelearningmastery.com/how-to-d...

Kubernetes (1)

Kubernetes notes

June 20, 2021

A simple collection of notes from my explorations of Kubeflow cluster.

Machine Learning (1)

Basic machine learning with python sklearn for classification

March 16, 2014

A demonstration of how to use python package sklearn for a basic machine learning task : classification.

Memory Networks (1)

Implementation of End-2-End Memory Network for Language Modeling

October 10, 2018

Tensorflow implementation of End-To-End Memory Networks for the language modeling task. I tried to name the variable as closely as possible to that in the p...

Message Passing Networks (1)

Encoding a set of Graphs using Neural Message Passing

January 10, 2019

You will need gpu and cuda with pytorch. Data used in the code

NLP (5)

Implementation of End-2-End Memory Network for Language Modeling

October 10, 2018

Tensorflow implementation of End-To-End Memory Networks for the language modeling task. I tried to name the variable as closely as possible to that in the p...

Parameter learning and updates in simple word2vec

August 7, 2016

A lot of materials on word2vec models such as Skipgram and CBOW are available that explain the models really well. This post is just a drop in that ocean try...

Simple Named entity Recognition (NER) with tensorflow

January 15, 2017

Given a piece of text, NER seeks to identify named entities in text and classify them into various categories such as names of persons, organizations, locat...

Simple Seq2Seq machine translation using GRU based encoder-decoder architecture

February 1, 2021

Adapted from https://d2l.ai/chapter_recurrent-modern/seq2seq.html

Using Roberta classification head for fine-tuning a pre-trained model

April 15, 2021

An example to show how we can use Huggingface Roberta Model for fine-tuning a classification task starting from a pre-trained model. The task involves binary...

Pytorch (6)

Encoding a set of Graphs using Neural Message Passing

January 10, 2019

You will need gpu and cuda with pytorch. Data used in the code

How is cross entropy computed in pytorch ?

January 16, 2021

CROSS ENTROPY LOSS (logits, class) = negative log of softmax of logits[class]

Pytorch - simple GRU experiment

February 1, 2021

Create a simple GRU layer using pytorch. Feed a tensor of shape batch_sizexnum_stepsxinput_size and observe the GRU output. Next feed the same input tensor ...

Siamese Network using Pytorch with simulated scatter plot data.

March 28, 2021

FullNotebook for this post

Simple Seq2Seq machine translation using GRU based encoder-decoder architecture

February 1, 2021

Adapted from https://d2l.ai/chapter_recurrent-modern/seq2seq.html

Using Roberta classification head for fine-tuning a pre-trained model

April 15, 2021

An example to show how we can use Huggingface Roberta Model for fine-tuning a classification task starting from a pre-trained model. The task involves binary...

Tensorflow (6)

Implementation of End-2-End Memory Network for Language Modeling

October 10, 2018

Tensorflow implementation of End-To-End Memory Networks for the language modeling task. I tried to name the variable as closely as possible to that in the p...

Multinomial (or multiclass) logistic regression (aka softmax regression) with tensorflow

January 1, 2016

Example of solving a parameterized model with Tensorflow - define the logistic regression with multiple classes to predict.

Read csv file with variable number of fields using Tensorflow

October 11, 2017

Input test data

Simple data feeding to Deepchem framework in tensorflow style

March 22, 2018

Deepchem provides a wonderful framework and library for developing deep learning and machine learning predictive models for small molecules. However, its und...

Tensorflow Recursive Neural Network (ReNN) simple example

September 20, 2016

A simple example demonstrating the use of TensorArray to create a recursive neural network, essentially a tree structured neural network.

Tensorflow TensorArray Simple Example

September 12, 2016

A small example on how to use Tensorflow TensorArray.

rdkit (1)

Visualize a given substructure in a given molecule using rdkit and python.

April 16, 2019

Given the smiles of a molecule and the smiles of a possible substructure, find the atoms of the substructure in the molecule. Visualize the molecule with the...