title: Passing and working with sparse matrix in TensorFlow
body: <p>Say that I have a matrix:</p>
  
  <pre><code>X = [
      [0, 0, 0, 0, 0],
      [0, 0, 1, 0, 0],
      [0, 0, 0, 0, 0],
      [2, 0, 0, 3, 0],
      [0, 0, 0, 0, 0],
      [0, 0, 0, 0, 0],
      [0, 4, 0, 0, 0]
  ]
  </code></pre>
  
  <p>but it is stored in a sparse format:</p>
  
  <pre><code># [row, column, value]
  X_sparse = [
      [1, 2, 1],
      [3, 0, 2],
      [3, 3, 3]
      [6, 1, 4],
  ]
  </code></pre>
  
  <p>I also have a vector</p>
  
  <pre><code>b = [1,2,3,4,5]
  </code></pre>
  
  <p>I would like to pass <code>X_sparse</code> to TensorFlow as data and multiply it with <code>b</code> (i.e. <code>np.dot(X, b)</code>). What is the correct way to do this in TensorFlow? Additionally, this is a toy example, while in real-life <code>X</code> has many rows and columns, so I'd rather not want to work with it converted to non-sparse format.</p>