precision, update_op = metrics.precision(
        labels, predictions, weights=constant_op.constant([[2], [5]]))