![](/img/trans.png)
[英]No OpKernel was registered to support Op 'HashTableV2' with these attrs. Registered devices: [CPU,GPU], Registered kernels:
[英][Apple M1]: I got No registered 'RngReadAndSkip' OpKernel for 'GPU' devices compatible with node {{node RngReadAndSkip}} . Registered: device='CPU'
這是我的代碼
random = tf.random.Generator.from_seed(42)
random = random.normal(shape=(2,2))
但我收到了這個錯誤:
tensorflow.python.framework.errors_impl.NotFoundError: No registered 'RngReadAndSkip'
OpKernel for 'GPU' devices compatible with node {{node RngReadAndSkip}}. Registered: device='CPU'
發生這種情況是因為某些 TF/Keras 高級方法沒有在 tensorflow-metal 中實現。 您可以嘗試以下解決方法:
with tf.device('/cpu:0'):
... # your code which need RngReadAndSkip low-level method here
接下來你可以正常做其他事情(使用 GPU)。
希望蘋果有一天會修復它(還有他們的另一噸錯誤,lmao)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.