import tensorflow as tf

        for method in at_methods:
            FLAGS.adv_training_method = method
            with tf.Graph().as_default():
                graphs.VatxtModel().classifier_graph()

                # Ensure variables have been reused
                # Embedding + LSTM layers + hidden layers + logits layer
                expected_num_vars = 1 + 2 * FLAGS.rnn_num_layers + 2 * (
                    FLAGS.cl_num_layers) + 2
                self.assertEqual(len(tf.trainable_variables()), expected_num_vars)

    def testSyncReplicas(self):
        FLAGS.sync_replicas = True
        graphs.VatxtModel().language_model_training()

    def testCandidateSampling(self):
        FLAGS.num_candidate_samples = 10
        graphs.VatxtModel().language_model_training()
