TensorFlow 2.4.1注册NumPy bfloat16扩展报AttributeError怎么办
TensorFlow 2.4.1 下 bfloat16 NumPy 扩展启用报错问题
我了解到TensorFlow中存在面向bfloat16的NumPy扩展,该扩展的实现位于TensorFlow官方源码tensorflow/python/lib/core/路径下的bfloat16_wrapper.cc模块中。
按照源码逻辑,该扩展理论上可通过调用RegisterNumpyBfloat16方法启用,但我在安装TensorFlow 2.4.1版本后,尝试调用该方法启用扩展时,触发了如下报错:
> tf.RegisterNumpyBfloat16() --------------------------------------------------------------------------- AttributeError Traceback (most recent call last) <ipython-input-6-4f89beb80796> in <module> ----> 1 tf.RegisterNumpyBfloat16() AttributeError: module 'tensorflow' has no attribute 'RegisterNumpyBfloat16'
想咨询我的操作存在哪些问题?或是该NumPy扩展的正确启用方式是什么?
非常感谢。
内容的提问来源于stack exchange,提问作者Kevin Meier
相关产品推荐
相关产品推荐

