class_docstr: Saves data in event and summary protos for tensorboard.
class_docstr_tok: ["Saves","data","in","event","and","summary","protos","for","tensorboard","."]
docstr: Saves an arbitrary tensor summary.
  
  Useful when working with custom plugins or constructing a summary directly.
  
  Args:
    tag: str: label for this data
    tensor: ndarray: tensor data to save.
    step: int: training step
    metadata: Optional SummaryMetadata, as a proto or serialized bytes.
  Note: markdown formatting is rendered by tensorboard.
docstr_tok: ["Saves","an","arbitrary","tensor","summary",".","Useful","when","working","with","custom","plugins","or","constructing","a","summary","directly",".","Args",":","tag",":","str",":","label","for","this","data","tensor",":","ndarray",":","tensor","data","to","save",".","step",":","int",":","training","step","metadata",":","Optional","SummaryMetadata",",","as","a","proto","or","serialized","bytes",".","Note",":","markdown","formatting","is","rendered","by","tensorboard","."]
code: def write(self, tag, tensor, step, metadata=None):
      """Saves an arbitrary tensor summary.
  
      Useful when working with custom plugins or constructing a summary directly.
  
      Args:
        tag: str: label for this data
        tensor: ndarray: tensor data to save.
        step: int: training step
        metadata: Optional SummaryMetadata, as a proto or serialized bytes.
      Note: markdown formatting is rendered by tensorboard.
      """
      with self._as_default(self._event_writer):
          tf.summary.write(
              tag=tag, tensor=tensor, step=step, metadata=metadata
          )
  
file_path: flax/flax/metrics/tensorboard.py
imports: import contextlib
  import functools
  import os
  import numpy
  import tensorflow
  from tensorboard.plugins.hparams import api
  from flax import io
label_desc: Use image node_id 9 for calling the SummaryWriter obj's underlying member method code with example usage: obj.write(tag, tensor, step, metadata) without return types