Код: Выделить всё
model = Sequential([
LSTM(units=50,return_sequences=True,input_shape=(lookback,1)),
Dense(units=1)
])
model.compile(loss=keras.losses.MSE,optimizer=keras.optimizers.Adam(),metrics=['accuracy'])
Код: Выделить всё
model.fit(trainx,trainy,validation_data=(testx,testy),epochs=20,batch_size=1)
Код: Выделить всё
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:
[[CudnnRNN]]
[[sequential_2/lstm_6/PartitionedCall]] [Op:__inference_train_function_15994]
Код: Выделить всё
print(tf. __version__)
Код: Выделить всё
print(tf.config.list_physical_devices('GPU'))
Обратите внимание на приведенный выше код работает отлично
если я запускаю его на процессоре
Код: Выделить всё
with tf.device('/CPU:0'):
model.fit(trainx,trainy,validation_data=(testx,testy),epochs=2,batch_size=1,verbose=1)
Подробнее здесь: https://stackoverflow.com/questions/755 ... on-amd-gpu