如何将包含 47 列和 99999 行的 pandas 数据库转换为 Tensorflow 2 中的张量?Kmeans 算法是否已经在 TF 2 下实现?因为该命令tf.contrib.factorization.KMeans
在 TF2 下不起作用,因为tf.contrib
第二个 API Tensorflow 上不再存在
- 项目清单
如何将包含 47 列和 99999 行的 pandas 数据库转换为 Tensorflow 2 中的张量?Kmeans 算法是否已经在 TF 2 下实现?因为该命令tf.contrib.factorization.KMeans
在 TF2 下不起作用,因为tf.contrib
第二个 API Tensorflow 上不再存在
我从这里得到了我的 TF2 示例与 KMeans 实现一起使用tf.compat.v1.estimator.experimental.KMeans
注意:截至 2019 年 11 月 7 日,代码示例存在问题。更改tf.estimator.experimental.KMeans
为tf.compat.v1.estimator.experimental.KMeans
同样对于任何寻找 TF 2 contrib 的人,r1.15tf.contrib
页面上都有一个引用:
警告: tf.contrib 模块不会包含在 TensorFlow 2.0 中。它的许多子模块已集成到 TensorFlow 核心中,或分拆到其他项目中,如 tensorflow_io 或 tensorflow_addons。有关如何升级的说明,请参阅迁移指南。