这是我的代码
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'
发布于 2021-10-28 00:12:04
这是因为一些TF/Keras高级方法没有在tensorflow-metal中实现。您可以尝试此解决方法:
with tf.device('/cpu:0'):
... # your code which need RngReadAndSkip low-level method here
接下来,你可以正常地做其他事情(使用GPU)。
希望,苹果有一天会修复它(还有他们的另一个成堆的bug,lmao)
https://stackoverflow.com/questions/69088577
复制相似问题