You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’m using tensorflow-cpu 2.10 with tf-directml-plugin, and I did not install cuda toolkit and cudnn (Should I install them? if I should then what versions to install). I keep getting this error
InvalidArgumentError: Graph execution error: No OpKernel was registered to support Op ‘CudnnRNN’ used by {{node CudnnRNN}} with these attrs: [seed=0, dropout=0, T=DT_FLOAT, input_mode=“linear_input”, direction=“unidirectional”, rnn_mode=“lstm”, seed2=0, is_training=true] Registered devices: [CPU, GPU] Registered kernels:
My specs:
Windows 11
RTX 4080
Here is my code:
# Set the maximum vocabulary size
vocab_size = 10000
# Convert the training text to sequences
train_sequences = tokenizer.texts_to_sequences(train_texts)
# Pad the sequences to have the same length
max_sequence_length = max(len(seq) for seq in train_sequences)
train_data = pad_sequences(train_sequences, maxlen=max_sequence_length)
# Create the main model
main_model = Sequential()
# Add the layers to the main model
main_model.add(Embedding(input_dim=vocab_size, output_dim=100, input_length=max_sequence_length))
main_model.add(Bidirectional(LSTM(64, return_sequences=True)))
# Create the Attention layer
attention = Attention()
# Apply the Attention layer to the main model's output
attention_output = attention([main_model.layers[-1].output, main_model.layers[-1].output])
# Create the new model that takes the Attention layer output as input
output = Dense(1, activation='sigmoid')(attention_output)
model = Model(inputs=main_model.input, outputs=output)
# Compile the model
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
# Reshape the predicted labels
train_labels = np.expand_dims(train_labels, axis=-1)
# Train the Bi-LSTM classifier on the whole training dataset
model.fit(train_data, train_labels, epochs=1, batch_size=32, verbose=1)
The text was updated successfully, but these errors were encountered:
You don't need to install cuda toolkit and cudnn as they don't work with this plugin. The plan was to eventually implement the CudnnRNN op for DirectML, but unfortunately we had to pause the development of this plugin until further notice. For the time being, all latest DirectML features and performance improvements are going into onnxruntime for inference scenarios. We'll update this issue if/when things change.
I have the same problem, but worse having moved from tf 2.10.0 to tf -cpu with plugin.
we need to uninstall the plugin and reinstall ff -gpu==2.10.0
and you will need CUDA 11.2 and CuDNN 8.
only 2 days wasted...
I’m using tensorflow-cpu 2.10 with tf-directml-plugin, and I did not install cuda toolkit and cudnn (Should I install them? if I should then what versions to install). I keep getting this error
My specs:
Windows 11
RTX 4080
Here is my code:
The text was updated successfully, but these errors were encountered: