title: Extracting neural net weights using tensorflow's tf.contrib.learn.DNNClassifier
body: <p>Is there a way to extract weight matrices from Tensorflow's tf.contrib.learn.DNNClassifier? I've tried to look up the Tensorflow site for an answer but I'm fairly new to this so I haven't found anything helpful so far. Sorry in advance if there is already explicit explanation for this in here that I wasn't able to find.</p>
  
  <p>My code:</p>
  
  <pre><code># read the csv file to numpy array
  df = tf.contrib.learn.datasets.base.load_csv_with_header(
        filename="data.csv",
        target_dtype=np.int,
        features_dtype=np.float64)
  
  X = df.data
  Y = df.target
  dimension = len(X)
  
  feature_columns = [tf.contrib.layers.real_valued_column("", dimension=dimension)]
  
  classifier = tf.contrib.learn.DNNClassifier(feature_columns=feature_columns,
                                                        hidden_units=[10,10],
                                                        n_classes=2,
                                                        activation_fn=tf.nn.sigmoid,
                                                        optimizer=tf.train.ProximalAdagradOptimizer(
                                                          learning_rate=0.1,
                                                          l2_regularization_strength=0.001))
  
  #Fit model
  classifier.fit(x=X, y=Y, steps=2000)
  </code></pre>