Skip to content

ValueError: Unrecognized keyword argument(s): {'mask_value': None} #758

Description

@amrzv

Hi.
When runnin notebook in colab on the line

dcn_result = run_models(use_cross_layer=True,
                        deep_layer_sizes=[192, 192])

the ValueError got raised

ValueError                                Traceback (most recent call last)
[/tmp/ipython-input-21-1445969553.py](https://localhost:8080/#) in <cell line: 0>()
----> 1 dcn_result = run_models(use_cross_layer=True,
      2                         deep_layer_sizes=[192, 192])

3 frames
[/tmp/ipython-input-19-2513347440.py](https://localhost:8080/#) in run_models(use_cross_layer, deep_layer_sizes, projection_dim, num_runs)
      4 
      5   for i in range(num_runs):
----> 6     model = DCN(use_cross_layer=use_cross_layer,
      7                 deep_layer_sizes=deep_layer_sizes,
      8                 projection_dim=projection_dim)

[/tmp/ipython-input-17-2634010612.py](https://localhost:8080/#) in __init__(self, use_cross_layer, deep_layer_sizes, projection_dim)
     27       vocabulary = vocabularies[feature_name]
     28       self._embeddings[feature_name] = tf.keras.Sequential(
---> 29           [tf.keras.layers.IntegerLookup(
     30               vocabulary=vocabulary, mask_value=None),
     31            tf.keras.layers.Embedding(len(vocabulary) + 1,

[/usr/local/lib/python3.11/dist-packages/keras/src/layers/preprocessing/integer_lookup.py](https://localhost:8080/#) in __init__(self, max_tokens, num_oov_indices, mask_token, oov_token, vocabulary, vocabulary_dtype, idf_weights, invert, output_mode, sparse, pad_to_max_tokens, name, **kwargs)
    337                 f"vocabulary_dtype={vocabulary_dtype}"
    338             )
--> 339         super().__init__(
    340             max_tokens=max_tokens,
    341             num_oov_indices=num_oov_indices,

[/usr/local/lib/python3.11/dist-packages/keras/src/layers/preprocessing/index_lookup.py](https://localhost:8080/#) in __init__(self, max_tokens, num_oov_indices, mask_token, oov_token, vocabulary_dtype, vocabulary, idf_weights, invert, output_mode, sparse, pad_to_max_tokens, name, **kwargs)
    191         kwargs.pop("dtype", None)
    192         if kwargs:
--> 193             raise ValueError(f"Unrecognized keyword argument(s): {kwargs}")
    194 
    195         if invert:

ValueError: Unrecognized keyword argument(s): {'mask_value': None}
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions