Electron microscopy
 
tf.keras.layers.StringLookup
- Python for Integrated Circuits -
- An Online Book -
Python for Integrated Circuits                                                                                   http://www.globalsino.com/ICs/        


Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix

=================================================================================

tf.keras.layers.StringLookup is a preprocessing layer which maps string features to integer indices and turns string categorical values into an encoded representation that can be read by an Embedding layer or Dense layer. In fact, some preprocessing layers have an internal state that can be computed based on a sample of the training data. The stateful preprocessing layers are:
          i) TextVectorization. It holds a mapping between string tokens and integer indices
          ii) StringLookup and IntegerLookup. They hold a mapping between input values and integer indices.
          iii) Normalization. It holds the mean and standard deviation of the features.
          iv) Discretization. It holds information about value bucket boundaries.

StringLookup is also a trainable layer.

Categorical features preprocessing layers includes:
        i) CategoryEncoding layer.
                tf.keras.layers.CategoryEncoding(num_tokens=None, output_mode='multi_hot', sparse=False, **kwargs)
        ii) Hashing layer.
                tf.keras.layers.Hashing(num_bins, mask_value=None, salt=None, output_mode="int", sparse=False, **kwargs)
        iii) StringLookup layer.
                tf.keras.layers.StringLookup(
                max_tokens=None,
                num_oov_indices=1,
                mask_token=None,
                oov_token="[UNK]",
                vocabulary=None,
                idf_weights=None,
                encoding=None,
                invert=False,
                output_mode="int",
                sparse=False,
                pad_to_max_tokens=False,
                **kwargs
                )
        iv) IntegerLookup layer.
                tf.keras.layers.IntegerLookup(
                max_tokens=None,
                num_oov_indices=1,
                mask_token=None,
                oov_token=-1,
                vocabulary=None,
                vocabulary_dtype="int64",
                idf_weights=None,
                invert=False,
                output_mode="int",
                sparse=False,
                pad_to_max_tokens=False,
                **kwargs
                )

============================================

         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         

 

 

 

 

 



















































 

 

 

 

 

=================================================================================