title: Tensorflow - How to know configuration of loaded model like weight shape so that I can create that graph in advance?
body: <p>I have different saved models where some of them use different configurations namely, the number of neurons and the optimizer type (Adam or RMS). Is there a way to know about these parameters during loading so that I can change the tensor shape or optimizer in the graph? Thanks.</p>
  
  <p>Currently, I am facing this error:</p>
  
  <pre><code>InvalidArgumentError (see above for traceback): Assign requires shapes of both 
  tensors to match. lhs shape= [186,256] rhs shape= [186,32]
  </code></pre>
  
  <p>I know I can change the shape manually but I wanted to know about a way to do this in the code. Also, if this is not possible, is there a way to save models in the future where I can know about their configuration in advance so that I don't get this error? Thanks.</p>