title: Importing slim model in tensorflow c++
body: <p>I have a network model defined using slim library in python tensorflow.
  Now I want to port it to c++. However it seems to me that tensorflow.contrib.slim is a python only library. How could I use it in my c++ software?</p>
  
  <p>Basically I have something like:</p>
  
  <pre><code>        self.conv1 = slim.convolution2d( \
              inputs=self.imageIn,num_outputs=32,\
              kernel_size=[8,8],stride=[4,4],padding='VALID', \
              biases_initializer=None,scope=myScope+'_conv1')
  </code></pre>
  
  <p>How could I implement this in c++ tensorflow?</p>
  
  <p>At the moment I'm trying to replace slim implementation with plain tensorflow, and then going c++. However replacing</p>
  
  <pre><code>self.conv1 = slim.convolution2d( \
              inputs=self.imageIn,num_outputs=32,\
              kernel_size=[8,8],stride=[1,4,4,1],padding='VALID', \
              biases_initializer=None, weights_initializer=_initializer, scope=myScope+'_conv1')
  </code></pre>
  
  <p>with plain tf</p>
  
  <pre><code>with tf.variable_scope(myScope+'_conv1'):
              weights = tf.get_variable("weights",[8, 8, 3, 32],
              initializer=_initializer,  dtype=tf.float32)
  
              self.conv1 = tf.nn.conv2d(self.imageIn, weights, [1, 4, 4, 1], padding='VALID')
  </code></pre>
  
  <p>in a working model produces a mess: nothing works anymore. What am I forgetting?</p>
  
  <p>Thanks a lot</p>