class_docstr: BaseApplication represents an interface.
  
  Each application ``type_str`` should support to use
  the standard training and inference driver.
class_docstr_tok: ["BaseApplication","represents","an","interface",".","Each","application","``","type_str","``","should","support","to","use","the","standard","training","and","inference","driver","."]
docstr: Add a TF placeholder for switching between train/valid graphs,
  this function sets ``self.is_validation``. ``self.is_validation``
  can be used by applications.
  
  :return:
docstr_tok: ["Add","a","TF","placeholder","for","switching","between","train\/valid","graphs",",","this","function","sets","``","self.is_validation","``",".","``","self.is_validation","``","can","be","used","by","applications",".",":","return",":"]
code: def add_validation_flag(self):
      """
      Add a TF placeholder for switching between train/valid graphs,
      this function sets ``self.is_validation``. ``self.is_validation``
      can be used by applications.
  
      :return:
      """
      self.is_validation = tf.placeholder_with_default(
          False, [], "is_validation"
      )
  
imports: import os
  from argparse import Namespace
  import tensorflow
  from six import with_metaclass
  from niftynet.engine.signal import TRAIN, INFER, EVAL
label_desc: Use image node_id 9 for calling the BaseApplication obj's underlying member method code with example usage: obj.add_validation_flag() without return types