- 报错TypeError: ‘numpy.ndarray’ object is not callable
return data.iloc[:, :-1].values()
去掉values后面的括号
- 报错 module ‘tensorflow_core._api.v2.train‘ has no attribute ‘GradientDescentOptimize
将
optimizer = tf.train.GradientDescentOptimizer
修改为
optimizer = tf.compat.v1.train.GradientDescentOptimizer
-
报错 DataFrame object has no attribute ‘as_matrix’
将 .as_matrix()
改为 .values -
报错 tf.placeholder() is not compatible with eager execution
在定义placeholder之前添加一句tf.compat.v1.disable_eager_execution()



