我使用 WALS 方法来执行矩阵分解。最初在tensorflow 1.13中我可以使用导入factorization_ops
from tensorflow.contrib.factorization.python.ops import factorization_ops
如中所述文档 https://github.com/GoogleCloudPlatform/tensorflow-recommendation-wals/blob/master/wals_ml_engine/trainer/wals.py
Wals模型可以通过使用从factorization_ops调用
factorization_ops.WALSModel
在tensorflow 2.0中使用相同的命令给出以下错误
ModuleNotFoundError:没有名为“tensorflow.contrib.factorization”的模块
正在经历issue https://github.com/tensorflow/tensorflow/issues/31350在tensorflow 2.0+中似乎没有办法使用WALSModel。
也有提到过here https://github.com/tensorflow/tensorflow/releases在tensorflow版本更新中,tf.contrib已被弃用,并且功能已迁移到核心TensorFlow API、生态系统项目(例如tensorflow/addons或tensorflow/io),或者完全删除。
如何在tensorflow 2.0中使用WALS模型(目前我在Windows机器上使用2.0.0-rc0)? WALSModel 是否已被删除或者我错过了一些信息?