So how many times do you ask Siri, Alexa, or Google for the weather or the time? Several kinds of bots are now in the market, some more complex capable of having a continuous conversation, and other ones that just do some pre-program actions. In this post, I will show you how to build a bot for pre-trained specific actions, you can use to check your stocks, time or weather to even web scrapping. If you are interested in this kind of technology I recommend starting with this simple one.

So now we will create our “dataset” but first, let's…


In today's post, I will share some of the most used Metrics Functions in Keras during the training process. A Metric Function is a value that we want to calculate in each epoch to analyze the training process online. For example, the recall o precision of a model is a good metric that doesn't affect the training process in terms of the loss function and will show us how the model is performing in each epoch in the training set and the validation set.

For evaluating and monitoring a training process in different Deep Learning project we will need different…


An ELMO layer implementation using TensorFlow-Hub and how to prepare data for any NLP task.

ELMo (em-beddings from Language Models) is a deep contextualized word representation that models both (1) complex characteristics of word use (e.g., syntax and semantics), and (2) how these uses vary across linguistic contexts (i.e., to model polysemy). These word vectors are learned functions of the internal states of a deep bidirectional language model (biLM), which is pre-trained on a large text corpus. …


BERT (Bidirectional Encoder Representations from Transformers) is a recent paper published by researchers at Google AI Language. BERT’s key technical innovation is applying the bidirectional training of the Transformer, a popular attention model, to language modeling. This is in contrast to previous efforts that looked at a text sequence either from left to right or combined left-to-right and right-to-left training. The paper’s results show that a language model that is bi-directionally trained can have a deeper sense of language context and flow than single-direction language models. ¹

In this post, we will focus on how to load a pre-train BERT…


In this post, I will show my learning rate decay implementation on Tensorflow Keras based on the cosine function.

One of the most difficult parameters to set while training any deep learning model is the learning rate. If it is a big value the weights of the model will begin to oscillate and they will have big changes, preventing the model from adjusting to the changes in the error and if the learning rate is too small, the training would be too slow, costing the model to learn and probable getting stuck in local minimum. Imagine that the learning process…


Implementation in TensorFlow and Keras of Bilinear CNN Models for Fine-grained Visual Recognition, paper.

FINE-GRAINED recognition tasks generally involve discrimination between categories that have a shared structure but differ in subtle ways, distinguishing between a “Toyota Prius” and a “Toyota corolla”. This requires the recognition of highly localized attributes under the changes of the position, point of view, lighting and other factors.

A bi-linear model for image classification consists of a quadruple B = (fA, fB, P, C). Where fA and fB are function functions, P is a grouping function and C is a classification function. A characteristic function is…


Implementation of BOW, TF-IDF, word2vec, GLOVE and own embeddings for sentiment analysis. This approach can be replicated for any NLP task.

The object of this post is to show some of the top NLP solutions specific in deep learning and some in classical machine learning methods. This a compilation of some posts and papers I have made in the past few months. As an example, I will use the Analytics Vidhya twitter sentiment analysis data set. Yes, another post of sentiment analysis. …

Sebastian Correa

Engineer with experience in machine learning, neural networks, deep learning. Specialized in pattern recognition, NPL and computer vision.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store