class_docstr: Testing layers from tflearn/layers
class_docstr_tok: ["Testing","layers","from","tflearn\/layers"]
code: def test_feed_dict_no_None(self):
      X = [
          [0.0, 0.0, 0.0, 0.0],
          [1.0, 1.0, 1.0, 1.0],
          [0.0, 0.0, 1.0, 0.0],
          [1.0, 1.0, 1.0, 0.0],
      ]
      Y = [[1.0, 0.0], [0.0, 1.0], [1.0, 0.0], [0.0, 1.0]]
  
      with tf.Graph().as_default():
          g = tflearn.input_data(shape=[None, 4], name="X_in")
          g = tflearn.reshape(g, new_shape=[-1, 2, 2, 1])
          g = tflearn.conv_2d(g, 4, 2)
          g = tflearn.conv_2d(g, 4, 1)
          g = tflearn.max_pool_2d(g, 2)
          g = tflearn.fully_connected(g, 2, activation="softmax")
          g = tflearn.regression(g, optimizer="sgd", learning_rate=1.0)
  
          m = tflearn.DNN(g)
  
          def do_fit():
              m.fit(
                  {"X_in": X, "non_existent": X},
                  Y,
                  n_epoch=30,
                  snapshot_epoch=False,
              )
  
          self.assertRaisesRegexp(
              Exception,
              "Feed dict asks for variable named 'non_existent' but no such variable is known to exist",
              do_fit,
          )
  
file_path: tflearn/tests/test_layers.py
imports: import tensorflow.compat.v1
  import tflearn
  import unittest
  import os
label_desc: Use image node_id 5 for calling the TestLayers obj's underlying member method code with example usage: obj.test_feed_dict_no_None() without return types