'Gets hashed-to buckets for batch of queries.
Args:
query: 2-d Tensor of query vectors.
Returns:
A list of hashed-to buckets for each hash function.'

def get_hash_slots(self, query):

    binary_hash = [tf.less(tf.matmul(query, self.hash_vecs[i], transpose_b=True), 0) for i in xrange(self.num_libraries)]
    hash_slot_idxs = [tf.reduce_sum((tf.to_int32(binary_hash[i]) * tf.constant([[(2 ** i) for i in xrange(self.num_hashes)]], dtype=tf.int32)), 1) for i in xrange(self.num_libraries)]
    return hash_slot_idxs
