我想在TensorFlow 2中使用哈希表。在TF 1.x中 tf.contrib.lookup ,但不清楚会发生什么,因为它没有在 move-to-addons RFC . 我担心这意味着它将被删除。
tf.contrib.lookup
我可以用 tf.strings.to_hash_bucket() 若要散列字符串,请创建一个包含散列索引处的值的稀疏张量,但这不会处理冲突。我需要自己重新实施碰撞管理。
tf.strings.to_hash_bucket()
有什么解决办法吗?