3

While working with Embedding for an LSTM model I came across an issue with input_length:

ValueError: Unrecognized keyword arguments passed to Embedding: {'input_length': 536}

Is input length being replaced with something else? Is this an error with the early release version or is the argument for the Embedding layer getting updated? How can I specify the input_length in the embedding layer for keras from tf 2.16?

It seems like python 3.12 does not have any other available tensorflow versions available, when trying to do pip install tensorflow=2.15.0 or any other version I get an error saying that pip can't find it. Should I adjust the python version on my machine or get Anaconda navigator to adjust it? Does it make it easy to work with different python version?

I tired installing another version of tensorflow to fix it but no other versions are available for python 3.12.

2
  • Please provide enough code so others can better understand or reproduce the problem. Commented Feb 27, 2024 at 22:06
  • I see the same issue with tensorflow 2.15.0 with the following code: ``` import tensorflow as tf model = tf.keras.models.Sequential() model.add(tf.keras.layers.Embedding(24, 10, input_length=4)) ``` Commented Mar 4, 2024 at 1:02

1 Answer 1

1

replace input_length with input_shape.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.