title: How to count total number of trainable parameters in a tensorflow model?
body: <p>Is there a function call or another way to count the total number of parameters in a tensorflow model?</p>
  
  <p>By parameters I mean: an N dim vector of trainable variables has N parameters, a <code>NxM</code> matrix has <code>N*M</code> parameters, etc. So essentially I'd like to sum the product of the shape dimensions of all the trainable variables in a tensorflow session.</p>