Open Bluehand1984 opened 1 month ago
Hi, I'm getting the same error, also in de solution... Did you find the solution?
Hi Again. I found that the error is because I had installed the 2.16.1 version (keras 3) of tensorflow, and the lab1 is for the 2.15.0 version (keras 2). I uninstalled the version I had and installed the 2.15.0 version instead. It worked.
pip3 install 'tensorflow==2.15.0' --force-reinstall
I am getting valuerror on my Juypter Lab and Vscode. This only work on Coblab. ValueError: Unrecognized keyword arguments passed to Embedding: {'batch_input_shape': [32, None]}
def build_model(vocab_size, embedding_dim, rnn_units, batch_size): model = tf.keras.Sequential([ tf.keras.layers.Embedding(vocab_size, embedding_dim, batch_input_shape=[batch_size,None]), LSTM(rnn_units),
tf.keras.layers.Dense(vocab_size) ])
return model
model = build_model(len(vocab), embedding_dim=256, rnn_units=1024, batch_size=32)