class_docstr: Maps values from a vocabulary to integer indices.
  
  This layer translates a set of arbitrary hashables into an integer output
  via a table-based lookup, with optional out-of-vocabulary handling. This is
  the basis layer for both IntegerLookup and StringLookup; it holds the common
  logic but is not intended to be exported as part of the Keras API.
  
  Args:
      max_tokens: The maximum size of the vocabulary for this layer.
          If `None`, there is no cap on the size of the vocabulary.
          Note that this size includes the OOV and mask tokens.
      num_oov_indices: The number of out-of-vocabulary tokens to use.
          If this value is more than 1, OOV inputs are hashed to determine
          their OOV value. If this value is 0,
          OOV inputs will cause an error when calling the layer.
      mask_token: A token that represents masked inputs.
          When `output_mode` is `"int"`,
          the token is included in vocabulary and mapped to index 0.
          In other output modes, the token will not appear in the vocabulary
          and instances of the mask token in the input will be dropped.
          If set to `None`, no mask term will be added.
      oov_token: Only used when `invert` is `True`.
          The token to return for OOV indices.
      vocabulary: Optional. Either an array or a string path to a text file.
          If passing an array, can pass a tuple, list, 1D numpy array,
          or 1D tensor containing the vocbulary terms.
          If passing a file path, the file should contain one line per term
          in the vocabulary. If this argument is set,
          there is no need to `adapt` the layer.
      vocabulary_dtype: The dtype of the vocabulary terms.
          For example, `"int64"` or `"string"`.
      idf_weights: Only valid when `output_mode` is `"tf_idf"`.
          A tuple, list, 1D numpy array, or 1D tensor or the same length
          as the vocabulary, containing the floating point
          inverse document frequency weights, which will be multiplied
          by per sample term counts for the final TF-IDF
          weight. If the `vocabulary` argument is set, and `output_mode`
          is `"tf_idf"`, this argument must be supplied.
      invert: Only valid when `output_mode` is `"int"`.
          If `True`, this layer will map indices to vocabulary items
          instead of mapping vocabulary items to indices.
          Defaults to `False`.
      output_mode: Specification for the output of the layer. Values can be
          `"int"`, `"one_hot"`, `"multi_hot"`, `"count"`, or `"tf_idf"`
          configuring the layer as follows:
          - `"int"`: Return the raw integer indices of the input tokens.
          - `"one_hot"`: Encodes each individual element in the input into an
              array the same size as the vocabulary, containing a 1
              at the element index. If the last dimension is size 1,
              will encode on that dimension.
              If the last dimension is not size 1,
              will append a new dimension for the encoded output.
          - `"multi_hot"`: Encodes each sample in the input into
              a single array the same size as the vocabulary,
              containing a 1 for each vocabulary term present in the sample.
              Treats the last dimension as the sample dimension,
              if input shape is `(..., sample_length)`, output shape will
              be `(..., num_tokens)`.
          - `"count"`: As `"multi_hot"`, but the int array contains a count
              of the number of times the token at that index appeared
              in the sample.
          - `"tf_idf"`: As `"multi_hot"`, but the TF-IDF algorithm
              is applied to find the value in each token slot.
          Defaults to `"int"`.
      pad_to_max_tokens: Only valid when `output_mode` is `"multi_hot"`,
          `"count"`, or `"tf_idf"`. If `True`, the output will have its
          feature axis padded to `max_tokens` even if the number
          of unique tokens in the vocabulary is less than max_tokens,
          resulting in a tensor of shape `(batch_size, max_tokens)`
          regardless of vocabulary size. Defaults to `False`.
      sparse: Boolean. Only applicable to `"one_hot"`, `"multi_hot"`,
          `"count"` and `"tf-idf"` output modes.
          If `True`, returns a `SparseTensor` instead of a dense `Tensor`.
          Defaults to `False`.
class_docstr_tok: ["Maps","values","from","a","vocabulary","to","integer","indices",".","This","layer","translates","a","set","of","arbitrary","hashables","into","an","integer","output","via","a","table-based","lookup",",","with","optional","out-of-vocabulary","handling",".","This","is","the","basis","layer","for","both","IntegerLookup","and","StringLookup",";","it","holds","the","common","logic","but","is","not","intended","to","be","exported","as","part","of","the","Keras","API",".","Args",":","max_tokens",":","The","maximum","size","of","the","vocabulary","for","this","layer",".","If","`","None","`",",","there","is","no","cap","on","the","size","of","the","vocabulary",".","Note","that","this","size","includes","the","OOV","and","mask","tokens",".","num_oov_indices",":","The","number","of","out-of-vocabulary","tokens","to","use",".","If","this","value","is","more","than","1",",","OOV","inputs","are","hashed","to","determine","their","OOV","value",".","If","this","value","is","0",",","OOV","inputs","will","cause","an","error","when","calling","the","layer",".","mask_token",":","A","token","that","represents","masked","inputs",".","When","`","output_mode","`","is","`","``","int","''","`",",","the","token","is","included","in","vocabulary","and","mapped","to","index","0",".","In","other","output","modes",",","the","token","will","not","appear","in","the","vocabulary","and","instances","of","the","mask","token","in","the","input","will","be","dropped",".","If","set","to","`","None","`",",","no","mask","term","will","be","added",".","oov_token",":","Only","used","when","`","invert","`","is","`","True","`",".","The","token","to","return","for","OOV","indices",".","vocabulary",":","Optional",".","Either","an","array","or","a","string","path","to","a","text","file",".","If","passing","an","array",",","can","pass","a","tuple",",","list",",","1D","numpy","array",",","or","1D","tensor","containing","the","vocbulary","terms",".","If","passing","a","file","path",",","the","file","should","contain","one","line","per","term","in","the","vocabulary",".","If","this","argument","is","set",",","there","is","no","need","to","`","adapt","`","the","layer",".","vocabulary_dtype",":","The","dtype","of","the","vocabulary","terms",".","For","example",",","`","``","int64","''","`","or","`","``","string","''","`",".","idf_weights",":","Only","valid","when","`","output_mode","`","is","`","``","tf_idf","''","`",".","A","tuple",",","list",",","1D","numpy","array",",","or","1D","tensor","or","the","same","length","as","the","vocabulary",",","containing","the","floating","point","inverse","document","frequency","weights",",","which","will","be","multiplied","by","per","sample","term","counts","for","the","final","TF-IDF","weight",".","If","the","`","vocabulary","`","argument","is","set",",","and","`","output_mode","`","is","`","``","tf_idf","''","`",",","this","argument","must","be","supplied",".","invert",":","Only","valid","when","`","output_mode","`","is","`","``","int","''","`",".","If","`","True","`",",","this","layer","will","map","indices","to","vocabulary","items","instead","of","mapping","vocabulary","items","to","indices",".","Defaults","to","`","False","`",".","output_mode",":","Specification","for","the","output","of","the","layer",".","Values","can","be","`","``","int","''","`",",","`","``","one_hot","''","`",",","`","``","multi_hot","''","`",",","`","``","count","''","`",",","or","`","``","tf_idf","''","`","configuring","the","layer","as","follows",":","-","`","``","int","''","`",":","Return","the","raw","integer","indices","of","the","input","tokens",".","-","`","``","one_hot","''","`",":","Encodes","each","individual","element","in","the","input","into","an","array","the","same","size","as","the","vocabulary",",","containing","a","1","at","the","element","index",".","If","the","last","dimension","is","size","1",",","will","encode","on","that","dimension",".","If","the","last","dimension","is","not","size","1",",","will","append","a","new","dimension","for","the","encoded","output",".","-","`","``","multi_hot","''","`",":","Encodes","each","sample","in","the","input","into","a","single","array","the","same","size","as","the","vocabulary",",","containing","a","1","for","each","vocabulary","term","present","in","the","sample",".","Treats","the","last","dimension","as","the","sample","dimension",",","if","input","shape","is","`","(","...",",","sample_length",")","`",",","output","shape","will","be","`","(","...",",","num_tokens",")","`",".","-","`","``","count","''","`",":","As","`","``","multi_hot","''","`",",","but","the","int","array","contains","a","count","of","the","number","of","times","the","token","at","that","index","appeared","in","the","sample",".","-","`","``","tf_idf","''","`",":","As","`","``","multi_hot","''","`",",","but","the","TF-IDF","algorithm","is","applied","to","find","the","value","in","each","token","slot",".","Defaults","to","`","``","int","''","`",".","pad_to_max_tokens",":","Only","valid","when","`","output_mode","`","is","`","``","multi_hot","''","`",",","`","``","count","''","`",",","or","`","``","tf_idf","''","`",".","If","`","True","`",",","the","output","will","have","its","feature","axis","padded","to","`","max_tokens","`","even","if","the","number","of","unique","tokens","in","the","vocabulary","is","less","than","max_tokens",",","resulting","in","a","tensor","of","shape","`","(","batch_size",",","max_tokens",")","`","regardless","of","vocabulary","size",".","Defaults","to","`","False","`",".","sparse",":","Boolean",".","Only","applicable","to","`","``","one_hot","''","`",",","`","``","multi_hot","''","`",",","`","``","count","''","`","and","`","``","tf-idf","''","`","output","modes",".","If","`","True","`",",","returns","a","`","SparseTensor","`","instead","of","a","dense","`","Tensor","`",".","Defaults","to","`","False","`","."]
code: def save_own_variables(self, store):
      if self.output_mode == "tf_idf":
          store["idf_weights"] = self.idf_weights_const.numpy()
  
imports: import collections
  import numpy
  from keras import backend
  from keras.layers.layer import Layer
  from keras.utils import argument_validation
  from keras.utils import tf_utils
  from keras.utils.module_utils import tensorflow
label_desc: Use image node_id 20 for calling the IndexLookup obj's underlying member method code with example usage: obj.save_own_variables(store) without return types