()
| 102 | |
| 103 | |
| 104 | def 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 | |
| 116 | def main(_): |
no test coverage detected
searching dependent graphs…