"comment":"logical_and Operator\n\nIt operates element-wise on X and Y, and returns the Out. X, Y and Out are N-dim boolean tensors.\nEach element of Out is calculated by $$Out = X \\&\\& Y$$\n",
"inputs":[
{
"name":"X",
"comment":"(LoDTensor) Left hand operand of logical_and operator",
"duplicable":0,
"intermediate":0
},{
"name":"Y",
"comment":"(LoDTensor) Right hand operand of logical_and operator",
"duplicable":0,
"intermediate":0
}],
"outputs":[
{
"name":"Out",
"comment":"(LoDTensor) n-dim bool tensor. Each element is $$Out = X \\&\\& Y$$",
"duplicable":0,
"intermediate":0
}],
"attrs":[]
},{
"type":"logical_not",
"comment":"logical_not Operator\n\nIt operates element-wise on X, and returns the Out. X and Out are N-dim boolean tensors.\nEach element of Out is calculated by $$Out = !X$$\n",
"inputs":[
{
"name":"X",
"comment":"(LoDTensor) Operand of logical_not operator",
"duplicable":0,
"intermediate":0
}],
"outputs":[
{
"name":"Out",
"comment":"(LoDTensor) n-dim bool tensor. Each element is $$Out = !X$$",
"duplicable":0,
"intermediate":0
}],
"attrs":[]
},{
},{
"type":"max_sequence_len",
"type":"max_sequence_len",
"comment":"Calculate the max sequence length through lod_rank_table.",
"comment":"Calculate the max sequence length through lod_rank_table.",
...
@@ -3276,47 +3317,6 @@
...
@@ -3276,47 +3317,6 @@
"comment":"(int, default 5 (FP32)) Output data type",
"comment":"(int, default 5 (FP32)) Output data type",
"generated":0
"generated":0
}]
}]
},{
"type":"logical_and",
"comment":"logical_and Operator\n\nIt operates element-wise on X and Y, and returns the Out. X, Y and Out are N-dim boolean tensors.\nEach element of Out is calculated by $$Out = X \\&\\& Y$$\n",
"inputs":[
{
"name":"X",
"comment":"(LoDTensor) Left hand operand of logical_and operator",
"duplicable":0,
"intermediate":0
},{
"name":"Y",
"comment":"(LoDTensor) Right hand operand of logical_and operator",
"duplicable":0,
"intermediate":0
}],
"outputs":[
{
"name":"Out",
"comment":"(LoDTensor) n-dim bool tensor. Each element is $$Out = X \\&\\& Y$$",
"duplicable":0,
"intermediate":0
}],
"attrs":[]
},{
"type":"logical_not",
"comment":"logical_not Operator\n\nIt operates element-wise on X, and returns the Out. X and Out are N-dim boolean tensors.\nEach element of Out is calculated by $$Out = !X$$\n",
"inputs":[
{
"name":"X",
"comment":"(LoDTensor) Operand of logical_not operator",
"duplicable":0,
"intermediate":0
}],
"outputs":[
{
"name":"Out",
"comment":"(LoDTensor) n-dim bool tensor. Each element is $$Out = !X$$",
"comment":"\nThis operator is to do multi-class non maximum suppression (NMS) on a batched\nof boxes and scores.\n\nIn the NMS step, this operator greedily selects a subset of detection bounding\nboxes that have high scores larger than score_threshold, if providing this\nthreshold, then selects the largest nms_top_k confidences scores if nms_top_k\nis larger than -1. Then this operator pruns away boxes that have high IOU\n(intersection over union) overlap with already selected boxes by adaptive\nthreshold NMS based on parameters of nms_threshold and nms_eta.\n\nAftern NMS step, at most keep_top_k number of total bboxes are to be kept\nper image if keep_top_k is larger than -1.\n\nThis operator support multi-class and batched inputs. It applying NMS\nindependently for each class. The outputs is a 2-D LoDTenosr, for each\nimage, the offsets in first dimension of LoDTensor are called LoD, the number\nof offset is N + 1, where N is the batch size. If LoD[i + 1] - LoD[i] == 0,\nmeans there is no detected bbox for this image. If there is no detected boxes\nfor all images, all the elements in LoD are 0, and the Out only contains one\nvalue which is -1.\n",
"inputs":[
{
"name":"BBoxes",
"comment":"(Tensor) A 2-D Tensor with shape [M, 4] represents the predicted locations of M bounding bboxes. Each bounding box has four coordinate values and the layout is [xmin, ymin, xmax, ymax].",
"duplicable":0,
"intermediate":0
},{
"name":"Scores",
"comment":"(Tensor) A 3-D Tensor with shape [N, C, M] represents the predicted confidence predictions. N is the batch size, C is the class number, M is number of bounding boxes. For each category there are total M scores which corresponding M bounding boxes. Please note, M is equal to the 1st dimension of BBoxes. ",
"duplicable":0,
"intermediate":0
}],
"outputs":[
{
"name":"Out",
"comment":"(LoDTensor) A 2-D LoDTensor with shape [No, 6] represents the detections. Each row has 6 values: [label, confidence, xmin, ymin, xmax, ymax], No is the total number of detections in this mini-batch. For each instance, the offsets in first dimension are called LoD, the number of offset is N + 1, if LoD[i + 1] - LoD[i] == 0, means there is no detected bbox.",
"duplicable":0,
"intermediate":0
}],
"attrs":[
{
"name":"background_label",
"type":"int",
"comment":"(int64_t, defalut: 0) The index of background label, the background label will be ignored. If set to -1, then all categories will be considered.",
"generated":0
},{
"name":"score_threshold",
"type":"float",
"comment":"(float) Threshold to filter out bounding boxes with low confidence score. If not provided, consider all boxes.",
"generated":0
},{
"name":"nms_top_k",
"type":"int",
"comment":"(int64_t) Maximum number of detections to be kept according to the confidences aftern the filtering detections based on score_threshold",
"generated":0
},{
"name":"nms_threshold",
"type":"float",
"comment":"(float, defalut: 0.3) The threshold to be used in NMS.",
"generated":0
},{
"name":"nms_eta",
"type":"float",
"comment":"(float) The parameter for adaptive NMS.",
"generated":0
},{
"name":"keep_top_k",
"type":"int",
"comment":"(int64_t) Number of total bboxes to be kept per image after NMS step. -1 means keeping all bboxes after NMS step.",
"generated":0
}]
},{
},{
"type":"sequence_erase",
"type":"sequence_erase",
"comment":"\nSequence Erase Operator.\n\nSequence erase operator erases tokens specified by Attr(tokens) from the input \nsequences Input(X), and outputs the remaining data and modifies the LoD \ninformation at the same time. For example, given a 2-D LoDTensor\n\n X = [[2, 2, 6, 1, 3, 9, 6, 1, 0, 1]]^T\n\nwith lod = [[0, 3, 6, 10]], there are three sequences in the input:\n\n X1 = [[2, 2, 6]]^T, X2 = [[1, 3, 9]]^T and X3 = [[6, 1, 0, 1]]^T.\n\nIf the tokens to be erased are Attr(tokens) = [2, 3, 5], after the erasing \noperation, the three sequences become\n\n X1' = [[6]]^T, X2' = [[1, 9]]^T and X3' = [[6, 1, 0, 1]]^T.\n\nHence the LoDTensor Output(Out) should be\n\n Out = [[6, 1, 9, 6, 1, 0, 1]]^T,\n\nwith lod = [[0, 1, 3, 7]].\n\nAn example usage for this operator is to remove the special tokens when \ncomputing the edit distance between two strings, such as blank, start token, \nand end token.\n",
"comment":"\nSequence Erase Operator.\n\nSequence erase operator erases tokens specified by Attr(tokens) from the input \nsequences Input(X), and outputs the remaining data and modifies the LoD \ninformation at the same time. For example, given a 2-D LoDTensor\n\n X = [[2, 2, 6, 1, 3, 9, 6, 1, 0, 1]]^T\n\nwith lod = [[0, 3, 6, 10]], there are three sequences in the input:\n\n X1 = [[2, 2, 6]]^T, X2 = [[1, 3, 9]]^T and X3 = [[6, 1, 0, 1]]^T.\n\nIf the tokens to be erased are Attr(tokens) = [2, 3, 5], after the erasing \noperation, the three sequences become\n\n X1' = [[6]]^T, X2' = [[1, 9]]^T and X3' = [[6, 1, 0, 1]]^T.\n\nHence the LoDTensor Output(Out) should be\n\n Out = [[6, 1, 9, 6, 1, 0, 1]]^T,\n\nwith lod = [[0, 1, 3, 7]].\n\nAn example usage for this operator is to remove the special tokens when \ncomputing the edit distance between two strings, such as blank, start token, \nand end token.\n",
...
@@ -5684,8 +5738,8 @@
...
@@ -5684,8 +5738,8 @@
"duplicable":0,
"duplicable":0,
"intermediate":0
"intermediate":0
},{
},{
"name":"ColToRowMatchDis",
"name":"ColToRowMatchDist",
"comment":"(Tensor) A 2-D Tensor with shape [N, M] in float type. N is batch size. If ColToRowMatchIndices[i][j] is -1, ColToRowMatchDis[i][j] is also -1.0. Otherwise, assumed ColToRowMatchIndices[i][j] = d, and the row offsets of each instance are called LoD. Then ColToRowMatchDis[i][j] = DistMat[d+LoD[i]][j]",
"comment":"(Tensor) A 2-D Tensor with shape [N, M] in float type. N is batch size. If ColToRowMatchIndices[i][j] is -1, ColToRowMatchDist[i][j] is also -1.0. Otherwise, assumed ColToRowMatchIndices[i][j] = d, and the row offsets of each instance are called LoD. Then ColToRowMatchDist[i][j] = DistMat[d+LoD[i]][j]",