At the very first place, you shouldn’t have copied the code blindly from a well known repo. Secondly, have you tried creating your own mini model first rather than using CNNs on text? The error is very clear, and what Ptrblck has suggested should help with that.