module ‘tensorflow’ has no attribute 'math’根本原因是 tensorflow 1.0 和 tensorflow 2.0 版本中的对复数操作的函数使用规则变了 1.0版本中可以直接调用 tf.floor(); 但2.0版本后该API被移动到tf.math库下面了 tf.math.floor().在tensorflow 1.0版本中,应为:tf.floor() 解决方法 本人使用的tensorflow 1.5.0,删除math即可