step_shared_embeddings_column | R Documentation |
This is similar to step_embedding_column, except that it produces a list of embedding columns that share the same embedding weights.
step_shared_embeddings_column(
spec,
...,
dimension,
combiner = "mean",
initializer = NULL,
shared_embedding_collection_name = NULL,
ckpt_to_load_from = NULL,
tensor_name_in_ckpt = NULL,
max_norm = NULL,
trainable = TRUE
)
spec |
A feature specification created with |
... |
Comma separated list of variable names to apply the step. selectors can also be used. |
dimension |
An integer specifying dimension of the embedding, must be > 0. Can also be a function of the size of the vocabulary. |
combiner |
A string specifying how to reduce if there are multiple entries in
a single row. Currently 'mean', 'sqrtn' and 'sum' are supported, with 'mean' the
default. 'sqrtn' often achieves good accuracy, in particular with bag-of-words
columns. Each of this can be thought as example level normalizations on
the column. For more information, see |
initializer |
A variable initializer function to be used in embedding
variable initialization. If not specified, defaults to
|
shared_embedding_collection_name |
Optional collective name of these columns. If not given, a reasonable name will be chosen based on the names of categorical_columns. |
ckpt_to_load_from |
String representing checkpoint name/pattern from
which to restore column weights. Required if |
tensor_name_in_ckpt |
Name of the Tensor in ckpt_to_load_from from which to
restore the column weights. Required if |
max_norm |
If not |
trainable |
Whether or not the embedding is trainable. Default is |
a FeatureSpec
object.
Does not work in the eager mode.
steps for a complete list of allowed steps.
Other Feature Spec Functions:
dataset_use_spec()
,
feature_spec()
,
fit.FeatureSpec()
,
step_bucketized_column()
,
step_categorical_column_with_hash_bucket()
,
step_categorical_column_with_identity()
,
step_categorical_column_with_vocabulary_file()
,
step_categorical_column_with_vocabulary_list()
,
step_crossed_column()
,
step_embedding_column()
,
step_indicator_column()
,
step_numeric_column()
,
step_remove_column()
,
steps
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.