class_docstr: Periodically saves embeddings of the data provided to ``data``
  using the latest state of the ``Ivis`` model.
  By default, saves embeddings every epoch; increasing the
  ``epoch_interval`` will save the embeddings less frequently.
  
  :param list[float] data: Data to embed with the latest Ivis object
  :param str log_dir: Folder to save resulting embeddings.
  :param str filename: Filename to save each file as. `{}` in string
      will be substituted with the epoch number.
  
  Example usage:
  ::
  
      from ivis.nn.callbacks import EmbeddingsLogging
      from ivis import Ivis
      from tensorflow.keras.datasets import mnsit
  
      (X_train, Y_train), (X_test, Y_test)  = mnist.load_data()
  
      # Save embeddings of test set every epoch
      embeddings_callback = EmbeddingsLogging(X_test,
                                              log_dir='test-embeddings',
                                              filename='{}_test_embeddings.npy',
                                              epoch_interval=1)
  
      model = Ivis(callbacks=[embeddings_callback])
  
      # Train on training set
      model.fit(X_train)
class_docstr_tok: ["Periodically","saves","embeddings","of","the","data","provided","to","``","data","``","using","the","latest","state","of","the","``","Ivis","``","model",".","By","default",",","saves","embeddings","every","epoch",";","increasing","the","``","epoch_interval","``","will","save","the","embeddings","less","frequently",".",":","param","list","[","float","]","data",":","Data","to","embed","with","the","latest","Ivis","object",":","param","str","log_dir",":","Folder","to","save","resulting","embeddings",".",":","param","str","filename",":","Filename","to","save","each","file","as",".","`","{","}","`","in","string","will","be","substituted","with","the","epoch","number",".","Example","usage",":",":",":","from","ivis.nn.callbacks","import","EmbeddingsLogging","from","ivis","import","Ivis","from","tensorflow.keras.datasets","import","mnsit","(","X_train",",","Y_train",")",",","(","X_test",",","Y_test",")","=","mnist.load_data","(",")","#","Save","embeddings","of","test","set","every","epoch","embeddings_callback","=","EmbeddingsLogging","(","X_test",",","log_dir='test-embeddings","'",",","filename=","'","{","}","_test_embeddings.npy","'",",","epoch_interval=1",")","model","=","Ivis","(","callbacks=","[","embeddings_callback","]",")","#","Train","on","training","set","model.fit","(","X_train",")"]
code: def __init__(
      self,
      data,
      log_dir="./embeddings_logs",
      filename="{}_embeddings.npy",
      epoch_interval=1,
  ):
      super(EmbeddingsLogging, self).__init__()
      self.data = data
      self.log_dir = log_dir
      os.makedirs(log_dir, exist_ok=True)
      self.filename = filename
      self.epoch_interval = epoch_interval
      self.epochs_since_last_save = 0
      self.embeddings = None
  
imports: import io
  import os
  import numpy
  import tensorflow
  from tensorflow.keras.callbacks import Callback
  from sklearn.preprocessing import MinMaxScaler
label_desc: Use image node_id 1 to create a new EmbeddingsLogging object from inherited base classes: Callback with example: obj = EmbeddingsLogging(data, log_dir, filename, epoch_interval)