DirectML InvalidArgumentError: Graph execution error: No OpKernel was registered to support Op 'CudnnRNN'

Viewed 20

i was trying to use DirectML for usage of my amd rx580 graphics card in tensorflow, but i'm having a real hard time to pull this up.

i'm getting this error:

---------------------------------------------------------------------------
InvalidArgumentError                      Traceback (most recent call last)
Input In [73], in <cell line: 24>()
     23 # fit network
     24 for i in range(n_epoch):
---> 25     model_LSTM_peso.fit(X, y, epochs=1, batch_size=n_batch, verbose=1, shuffle=False)
     26     model_LSTM_peso.reset_states()

File ~\anaconda3\envs\tfdml_plugin\lib\site-packages\keras\utils\traceback_utils.py:67, in filter_traceback.<locals>.error_handler(*args, **kwargs)
     65 except Exception as e:  # pylint: disable=broad-except
     66   filtered_tb = _process_traceback_frames(e.__traceback__)
---> 67   raise e.with_traceback(filtered_tb) from None
     68 finally:
     69   del filtered_tb

File ~\anaconda3\envs\tfdml_plugin\lib\site-packages\tensorflow\python\eager\execute.py:54, in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
     52 try:
     53   ctx.ensure_initialized()
---> 54   tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
     55                                       inputs, attrs, num_outputs)
     56 except core._NotOkStatusException as e:
     57   if name is not None:

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", is_training=true, seed2=0]
Registered devices: [CPU, GPU]
Registered kernels:
  <no registered kernels>

     [[CudnnRNN]]
     [[sequential_11/lstm_3/PartitionedCall]] [Op:__inference_train_function_491977]

I have running another code that fits with the model for embedding. So the rest of the code is running, but seems to be that the problem that i have is just for use LSTM

from pandas import DataFrame
from pandas import concat
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM

values = input_emb_peso
X, y = values, input_peso
X = X.reshape(X.shape[0],X.shape[1], 1)
# configure network
n_batch = 1
n_epoch = 1 #X.shape[0] #len(grupo_carrera_train) #19485 carreras de entrenamiento
n_neurons = 80
# design network
model_LSTM_peso = Sequential()
model_LSTM_peso.add(LSTM(n_neurons, batch_input_shape=(n_batch,X.shape[1], X.shape[2]), stateful=True))
model_LSTM_peso.add(Dense(80))
model_LSTM_peso.add(Dense(80))
model_LSTM_peso.add(Dense(1))
model_LSTM_peso.compile(loss='mean_squared_error', optimizer='adam')
# fit network
for i in range(n_epoch):
    model_LSTM_peso.fit(X, y, epochs=1, batch_size=n_batch, verbose=1, shuffle=False)
    model_LSTM_peso.reset_states()
0 Answers
Related