When using CNN, we often have to provide the dimension of images ahead of time. Note that I used singular, not plural “Dimensions”. That’s because most of the time, it requires us to input tensors of the same dimension.

However, we have a little bit of a problem here. It turned out, Keras actually does allow you to have variable dimensions of images as input. As long as you use a global polling layer before flattening the “features” generated by CNN layers. This is particularly useful to us. We work a lot on digital document processing; these scanned documents invariably…


Recently (at least pre-covid sense), Tensorflow’s Keras implementation added Attention layers. There are two types of attention layers included in the package:

  1. Luong’s style attention layer
  2. Bahdanau’s style attention layer

The two types of attention layers function nearly identically except for how they calculate the score.

Interestingly, Tensorflow’s own tutorial does not use these two layers. Instead, it wrote a separate Attention layer. The difficulty for folks who only read paper 1) and 2) when reading the source code is that the source code introduced some concepts such as “mask”, “query”, “key”, “value” , which are absent from the papers…


The original blog post was on Softmax Data’s blog.

Lately, we have been customizing LSTM layer for a Natural Language Generation project. As a result, I have been going through Keras’ LSTM source code and want to share some of my understanding. Hopefully my limited knowledge would benefit you in some shape or form.

Alright, let’s jump right in.

Where to find the source code

Keras’ source code ispublicly available here.

It seems that the team put all recurrent layers in a single file. There are a few things you need to understand before you decide to move on here:

  1. What is LSTM and the detailed…


In this blog, we will talk about how to use two different machine learning techniques (LDA and Word2Vec) to analyze and query the topics in sales emails (or all emails). I will also share the code (<50 lines) for you to immediately start querying your emails. You don’t need any machine learning background to proceed.

The original blog is published at https://blog.softmaxdata.com/what-are-inside-sales-emails/


Softmax Data has been providing companies with machine learning services companies related to Natural Language Processing (NLP), image processing and financial modeling. Recently, we made a collective decision to devote more resources to custom solutions related to sales enablement and sales operations. Why do we undertake these efforts? Because we are witnessing a wave of changes in these two fields, which are also essential to the fiscal health of every firm. In this blog, I will list examples, where we applied ML in solving real-world challenges in these two fields for our clients.

This long blog is cut up into…


In the previous blog, I talked about enhancing Sales Enablement with machine learning. In this blog, I will go into some examples of using machine learning to improve sales operations.

Machine Learning in Sales Operations

Sales operations, despite its name, has more focus on business intelligence and data analytics. Back to the analogy about military operations: sales operations is closer to the intelligence analysts watching satellite images and sensor data to relay progress on a battlefield to generals. …


In the last blog, I talked about the definition of Sales Enablement and Sales Operations. In this blog, I will go deeper into some of the examples of applying machine learning in Sales Enablement.

Machine Learning in Sales Enablement

Let’s start with sales enablement. Every sale starts with a list of leads. Some of them become qualified leads, of which, a fraction converts to customers in the end. Often companies buy leads from list vendors, which in return may buy leads from other providers and compile them together. There are quite a lot of issues with this approach:

  1. Anyone can buy the same lead lists…


Softmax Data has been providing companies with machine learning services companies related to Natural Language Processing (NLP), image processing and financial modeling. Recently, we made a collective decision to devote more resources to custom solutions related to sales enablement and sales operations. Why do we undertake these efforts? Because we are witnessing a wave of changes in these two fields, which are also essential to the fiscal health of every firm. Let’s look at some of the examples from our past and current clients.

We will cover how we tackle tasks such as:

  • Leads gathering
  • Contact verification
  • Leads Prioritization
  • User…


At Softmax Data, we often work with a variety of cloud infrastructures; from AWS, Ali Cloud, Google Cloud to Azure. Occasionally, we have to migrate RDS from one cloud server to another. Our favorite is Postgres, given its superior performance and flexibility in storing data. In this short blog post, I want to show how to move the entire Postgres from one cloud server to another with brutal force. Keep in mind, this migration method, although fast, may come with some risks; for example:

  • Since we will be copying files over the Internet, there is a chance some data may…


A sequence-to-sequence (seq2seq) generation problem is to translate one sequence in one domain into another sequence in another domain. The classic example is the machine translation problem. For example, translating from English to Chinese

Happy Chinese New Year → 新春快乐

Another example would be a chatbot that responds to input text:

Hello, my cold friend →  Hello, Jian Yan

As you can see, the input sequence does not need to match the output sequence in length. The most common seq2seq method is to use an Encoder-Decoder structure. …

Jia Chen

Partner at Softmax Data, a Machine Learning Advisory (NLP, Data Science, BI and Advanced Analytics); jia [atsign] softmaxdata.com

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