class_docstr: This class consists of network variables and operations at each iteration.
  It is generated by the application engine but can be modified by the
  application as well.
class_docstr_tok: ["This","class","consists","of","network","variables","and","operations","at","each","iteration",".","It","is","generated","by","the","application","engine","but","can","be","modified","by","the","application","as","well","."]
docstr: converting current_iter_output to tf summary and write to ``writer``
  
  :param writer: writer instance for summary output
  :return:
docstr_tok: ["converting","current_iter_output","to","tf","summary","and","write","to","``","writer","``",":","param","writer",":","writer","instance","for","summary","output",":","return",":"]
code: def to_tf_summary(self, writer=None):
      """
      converting current_iter_output to tf summary and write to ``writer``
  
      :param writer: writer instance for summary output
      :return:
      """
      if writer is None:
          return
      try:
          summary = self.current_iter_output.get(TF_SUMMARIES, {})
      except AttributeError:
          summary = None
  
      if not summary:
          return
      writer.add_summary(summary, self.current_iter)
  
imports: import itertools
  import time
  from niftynet.engine.application_variables import CONSOLE, TF_SUMMARIES
  from niftynet.engine.signal import TRAIN, VALID, INFER
  from niftynet.utilities.util_common import look_up_operations
label_desc: Use image node_id 18 for calling the IterationMessage obj's underlying member method code with example usage: obj.to_tf_summary(writer) without return types