コード例 #1
0
ファイル: facenet.py プロジェクト: thaiph99/facenet
def get_control_flag(control, field):
    return tf.equal(tf.mod(tf.floor_div(control, field), 2), 1)
コード例 #2
0
 def project_outer(self, index):
     """Projects an index with the same index set onto the outer components."""
     return IndexMap(indices=tf.floor_div(index.indices,
                                          self.inner_index.num_segments),
                     num_segments=self.outer_index.num_segments,
                     batch_dims=index.batch_dims)