Categorical Variable Reduction using NN
You are multiplying matrices, so the dimensions have to match up.

The following line reshapes the embedding layer to a rank 1 matrix, hence causing the error.

embedded_chars = tf.reshape(embedded_chars, [-1])


You may want to rethink the embedding portion of the code (the function's docstring), as that is what needs to be understood perfectly in order to define the computational graph.