【发布时间】:2019-05-26 20:18:13
【问题描述】:
在 TensorFlow 2 中,@tf.function 装饰器允许 Python 函数(或多或少)成为 TensorFlow 图,并可以带来一些性能改进。但是,当以这种方式装饰时,Python no longer traces the functions each time they run。这使得使用 Python 调试器调试函数变得更加困难。有没有办法暂时禁用所有 @tf.function 装饰器以方便调试?
【问题讨论】:
标签: python tensorflow tensorflow2.0