Hi, and thanks for the response.
I can confirm that blocking with tf.device('/device:CPU:0'): does allow the code to run without fault though obviously with a performance penalty.
However, I did run the code (without the tf.device statement) from the command line and got the fatal error shown below.
To test further, I also set up an account on Paperspace. The code runs correctly (with recurrent_dropout and without tf.device) inside their Jupyter notebooks (which they call Gradient notebooks).
Summarizing:
The code works in Google Colab and Paperspace in their Jupyter-based notebooks.
It crashes on my M1 Mac both in Jupyter (IPython) and at the command line (straight Python 3.9.5)
Fatal error at the command line
WARNING:tensorflow:Layer lstm will not use cuDNN kernels since it doesn't meet the criteria. It will use a generic GPU kernel as fallback when running on GPU.
Epoch 1/50
2022-01-31 21:29:47.106964: I tensorflow/core/grappler/optimizers/custom_graph_optimizer_registry.cc:112] Plugin optimizer for device_type GPU is enabled.
2022-01-31 21:29:47.365931: F tensorflow/core/framework/tensor.cc:681] Check failed: IsAligned() ptr = 0x17adba1f0
zsh: abort python test.py
Topic:
Machine Learning & AI
SubTopic:
General
Tags: