title: Cost function for Convolution neural network
body: <p>I am doing Text Classification by Convolution Neural Network. In the example <a href="https://www.tensorflow.org/versions/r0.10/tutorials/mnist/beginners/index.html" rel="nofollow noreferrer">MNIST</a> they have 60.000 images examples of hand-written digits, each image has size 28 x 28 and there are 10 labels (from 0 to 9). So the size of Weight will be 784 * 10 (28 * 28 = 784)</p>
  <p><a href="https://i.stack.imgur.com/qKVBF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qKVBF.png" alt="enter image description here" /></a></p>
  <p>Here is their code:</p>
  <pre><code>x = tf.placeholder(&quot;float&quot;, [None, 784])
  W = tf.Variable(tf.zeros([784,10]))
  b = tf.Variable(tf.zeros([10]))
  </code></pre>
  <p>In my case, I applied <a href="https://www.tensorflow.org/versions/r0.10/tutorials/word2vec/index.html" rel="nofollow noreferrer">word2vec</a> to encode my documents. The result &quot;dictionary size&quot; of word embedding is 2000 and the embedding size is 128. There are 45 labels. I tried to do the same as the example but It did not work. Here what I did: I treated each document same as image. For instance, The document could be represent as the matrix of 2000 x 128 (for words appear in document I appended the word Vector value for that column and left other equal zero. I have a trouble with creating W and x since my input data is a numpy array of 2000 x 128 while <code>x = tf.placeholder(&quot;float&quot;, [None, 256000])</code>. The size did not match.</p>
  <p>Could nay one suggest any advises ?</p>
  <p>Thanks</p>