1、tensorflow
tf.string_to_hash_bucket()
https://blog.csdn.net/pearl8899/article/details/107958334
2、python
import hashlib
id='test'
bucket_size=4096
id_hash = id.encode('utf-8')
id_hash = int(hashlib.md5(id_hash).hexdigest(), 16) % bucket_size
1、tensorflow
tf.string_to_hash_bucket()
https://blog.csdn.net/pearl8899/article/details/107958334
2、python
import hashlib
id='test'
bucket_size=4096
id_hash = id.encode('utf-8')
id_hash = int(hashlib.md5(id_hash).hexdigest(), 16) % bucket_size