【问题标题】:Kmeans clustering using TENSORFLOW2使用 TENSORFLOW2 进行 Kmeans 聚类
【发布时间】:2019-11-27 10:24:30
【问题描述】:
如何将包含 47 列和 99999 行的 pandas 数据库转换为
张量流2? Kmeans 算法是否已经在 TF 2 下实现?因为 tf.contrib.factorization.KMeans 命令在 TF2 下不起作用,因为 tf.contrib 在第二个 API Tensorflow 上不再存在
- 列表项
【问题讨论】:
标签:
python
tensorflow
tensorflow2.0
spherical-kmeans
【解决方案1】:
我的 TF2 示例从这里 tf.compat.v1.estimator.experimental.KMeans 开始使用 KMeans 实现
注意:截至 2019 年 11 月 7 日,代码示例存在问题。将tf.estimator.experimental.KMeans 更改为tf.compat.v1.estimator.experimental.KMeans
对于任何寻找 TF 2 贡献者的人,r1.15 tf.contrib 页面上有一个引用:
警告: tf.contrib 模块不会包含在 TensorFlow 2.0 中。
它的许多子模块已集成到 TensorFlow 核心中,或者
衍生到其他项目,如 tensorflow_io 或 tensorflow_addons。
有关如何升级的说明,请参阅迁移指南。