I'm trying to define a custom layer in keras,but I can't find a way to warp tf.cond with layers.Lambda function
matches = tf.cond(
tf.greater(N, 0),
lambda: match_boxes(
anchors, groundtruth_boxes,
positives_threshold=positives_threshold,
negatives_threshold=negatives_threshold,
force_match_groundtruth=True
),
lambda: only_background
)