‘XXX‘ object has no attribute ‘xxx‘ tensorflow版本间函数变动 踩坑记录
1.AttributeError:module‘tensorflow’hasnoattribute‘py_func’官方文档:https://www.tensorflow.org/api_docs/python/tf/compat/v1/py_func我将py_func换成tf.compat.v1.py_func通过。tf.compat.v1.py_func(func,inp,Tout,state