Using CNN for text classification

I am trying to implement the following paper - (

This is a variation of the more famous paper - using CNNs for text classification. I am currently following the blog post by WildML (

I am stuck at a point and could use some help.

Here’s the SO question which I posted.

Any help would be appreciated, thank you.!