class_docstr: Base class for FM.
  This class implements L2-regularized arbitrary order FM model.
  
  It supports arbitrary order of interactions and has linear complexity in the
  number of features (a generalization of the approach described in Lemma 3.1
  in the referenced paper, details will be added soon).
  
  It can handle both dense and sparse input. Only numpy.array and CSR matrix are
  allowed as inputs; any other input format should be explicitly converted.
  
  Support logging/visualization with TensorBoard.
  
  
  Parameters (for initialization)
  ----------
  batch_size : int, default: -1
      Number of samples in mini-batches. Shuffled every epoch.
      Use -1 for full gradient (whole training set in each batch).
  
  n_epoch : int, default: 100
      Default number of epoches.
      It can be overrived by explicitly provided value in fit() method.
  
  log_dir : str or None, default: None
      Path for storing model stats during training. Used only if is not None.
      WARNING: If such directory already exists, it will be removed!
      You can use TensorBoard to visualize the stats:
      `tensorboard --logdir={log_dir}`
  
  session_config : tf.ConfigProto or None, default: None
      Additional setting passed to tf.Session object.
      Useful for CPU/GPU switching, setting number of threads and so on,
      `tf.ConfigProto(device_count = {'GPU': 0})` will disable GPU (if enabled)
  
  verbose : int, default: 0
      Level of verbosity.
      Set 1 for tensorboard info only and 2 for additional stats every epoch.
  
  kwargs : dict, default: {}
      Arguments for TFFMCore constructor.
      See TFFMCore's doc for details.
  
  Attributes
  ----------
  core : TFFMCore or None
      Computational graph with internal utils.
      Will be initialized during first call .fit()
  
  session : tf.Session or None
      Current execution session or None.
      Should be explicitly terminated via calling destroy() method.
  
  steps : int
      Counter of passed lerning epochs, used as step number for writing stats
  
  n_features : int
      Number of features used in this dataset.
      Inferred during the first call of fit() method.
  
  intercept : float, shape: [1]
      Intercept (bias) term.
  
  weights : array of np.array, shape: [order]
      Array of underlying representations.
      First element will have shape [n_features, 1],
      all the others -- [n_features, rank].
  
  Notes
  -----
  You should explicitly call destroy() method to release resources.
  See TFFMCore's doc for details.
code: def save_state(self, path):
      self.core.saver.save(self.session, path)
  
imports: import tensorflow
  from .core import TFFMCore
  from sklearn.base import BaseEstimator
  from abc import ABCMeta, abstractmethod
  import six
  from tqdm import tqdm
  import numpy
  import os
label_desc: Use image node_id 8 for calling the TFFMBaseModel obj's underlying member method code with example usage: obj.save_state(path) without return types