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
with tf.device("/job:localhost/replica:0/task:0/device:GPU:0"):
model = Sequential()
model.add(
Embedding(input_dim=max_num_words, input_length=seq_len, output_dim=embedding_size)
)
model.add(LSTM(units=25))
# model.add(Dense(128, activation="relu"))
model.add(Dense(64, activation="relu"))
model.add(Dense(3, activation="softmax"))
adam = Adam(learning_rate=0.001)
model.compile(optimizer=adam, loss="binary_crossentropy", metrics=["accuracy"])
model.fit(train_x, y, validation_split=0.1, epochs=3, batch_size=24)
InvalidArgumentError Traceback (most recent call last)
Cell In[14], line 14
11 adam = Adam(learning_rate=0.001)
12 model.compile(optimizer=adam, loss="binary_crossentropy", metrics=["accuracy"])
---> 14 model.fit(train_x, y, validation_split=0.1, epochs=3, batch_size=24)
File ~\anaconda3\envs\directml_tf2\lib\site-packages\keras\utils\traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs)
67 filtered_tb = _process_traceback_frames(e.traceback)
68 # To get the full stack trace, call:
69 # tf.debugging.disable_traceback_filtering()
---> 70 raise e.with_traceback(filtered_tb) from None
71 finally:
72 del filtered_tb
File ~\anaconda3\envs\directml_tf2\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", seed2=0, is_training=true]
Registered devices: [CPU, GPU]
Registered kernels:
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
with tf.device("/job:localhost/replica:0/task:0/device:GPU:0"):
model = Sequential()
model.add(
Embedding(input_dim=max_num_words, input_length=seq_len, output_dim=embedding_size)
)
model.add(LSTM(units=25))
# model.add(Dense(128, activation="relu"))
model.add(Dense(64, activation="relu"))
model.add(Dense(3, activation="softmax"))
InvalidArgumentError Traceback (most recent call last)
Cell In[14], line 14
11 adam = Adam(learning_rate=0.001)
12 model.compile(optimizer=adam, loss="binary_crossentropy", metrics=["accuracy"])
---> 14 model.fit(train_x, y, validation_split=0.1, epochs=3, batch_size=24)
File ~\anaconda3\envs\directml_tf2\lib\site-packages\keras\utils\traceback_utils.py:70, in filter_traceback..error_handler(*args, **kwargs)
67 filtered_tb = _process_traceback_frames(e.traceback)
68 # To get the full stack trace, call:
69 #
tf.debugging.disable_traceback_filtering()
---> 70 raise e.with_traceback(filtered_tb) from None
71 finally:
72 del filtered_tb
File ~\anaconda3\envs\directml_tf2\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", seed2=0, is_training=true]
Registered devices: [CPU, GPU]
Registered kernels:
Beta Was this translation helpful? Give feedback.
All reactions