MCPcopy Create free account
hub / github.com/google-research/language / make_hash_fn

Function make_hash_fn

language/orqa/preprocessing/create_data_splits.py:104–113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102
103
104def make_hash_fn():
105 session = tf.Session()
106 placeholder = tf.placeholder(tf.string, [])
107 hash_bucket = tf.strings.to_hash_bucket_fast(placeholder, 100000)
108 result = tf.mod(hash_bucket, 10)
109
110 def _hash_fn(x):
111 return session.run(result, feed_dict={placeholder: x})
112
113 return _hash_fn
114
115
116def main(_):

Callers 3

resplit_nqFunction · 0.85
resplit_wbFunction · 0.85
resplit_ctFunction · 0.85

Calls 1

placeholderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…