diff --git a/develop/doc/operators.json b/develop/doc/operators.json index f1d6c8437ee0c7998b7e3d39366c51e01201c647..9ea016f5dbe211254340c5f9f5d2e4a7e3f96f77 100644 --- a/develop/doc/operators.json +++ b/develop/doc/operators.json @@ -1158,6 +1158,24 @@ "intermediate" : 0 } ], "attrs" : [ ] +},{ + "type" : "reciprocal", + "comment" : "\nReciprocal Activation Operator.\n\n$$out = \\frac{1}{x}$$\n\n", + "inputs" : [ + { + "name" : "X", + "comment" : "Input of Reciprocal operator", + "duplicable" : 0, + "intermediate" : 0 + } ], + "outputs" : [ + { + "name" : "Out", + "comment" : "Output of Reciprocal operator", + "duplicable" : 0, + "intermediate" : 0 + } ], + "attrs" : [ ] },{ "type" : "softmax", "comment" : "\nSoftmax Operator.\n\nThe input of the softmax operator is a 2-D tensor with shape N x K (N is the\nbatch_size, K is the dimension of input feature). The output tensor has the\nsame shape as the input tensor.\n\nFor each row of the input tensor, the softmax operator squashes the\nK-dimensional vector of arbitrary real values to a K-dimensional vector of real\nvalues in the range [0, 1] that add up to 1.\nIt computes the exponential of the given dimension and the sum of exponential\nvalues of all the other dimensions in the K-dimensional vector input.\nThen the ratio of the exponential of the given dimension and the sum of\nexponential values of all the other dimensions is the output of the softmax\noperator.\n\nFor each row $i$ and each column $j$ in Input(X), we have:\n $$Out[i, j] = \\frac{\\exp(X[i, j])}{\\sum_j(exp(X[i, j])}$$\n\n", @@ -1574,24 +1592,6 @@ "intermediate" : 0 } ], "attrs" : [ ] -},{ - "type" : "reciprocal", - "comment" : "\nReciprocal Activation Operator.\n\n$$out = \\frac{1}{x}$$\n\n", - "inputs" : [ - { - "name" : "X", - "comment" : "Input of Reciprocal operator", - "duplicable" : 0, - "intermediate" : 0 - } ], - "outputs" : [ - { - "name" : "Out", - "comment" : "Output of Reciprocal operator", - "duplicable" : 0, - "intermediate" : 0 - } ], - "attrs" : [ ] },{ "type" : "reduce_min", "comment" : "\nReduceMin Operator.\n\nThis operator computes the min of input tensor along the given dimension. \nThe result tensor has 1 fewer dimension than the input unless keep_dim is true.\nIf reduce_all is true, just reduce along all dimensions and output a scalar.\n\n", @@ -5008,6 +5008,29 @@ "intermediate" : 0 } ], "attrs" : [ ] +},{ + "type" : "bipartite_match", + "comment" : "\nThis operator is a greedy bipartite matching algorithm, which is used to\nobtain the matching with the maximum distance based on the input\ndistance matrix. For input 2D matrix, the bipartite matching algorithm can\nfind the matched column for each row, also can find the matched row for\neach column. And this operator only calculate matched indices from column\nto row. For each instance, the number of matched indices is the number of\nof columns of the input ditance matrix.\n\nThere are two outputs to save matched indices and distance.\nA simple description, this algothrim matched the best (maximum distance)\nrow entity to the column entity and the matched indices are not duplicated\nin each row of ColToRowMatchIndices. If the column entity is not matched\nany row entity, set -1 in ColToRowMatchIndices.\n\nPlease note that the input DistMat can be LoDTensor (with LoD) or Tensor.\nIf LoDTensor with LoD, the height of ColToRowMatchIndices is batch size.\nIf Tensor, the height of ColToRowMatchIndices is 1.\n\n", + "inputs" : [ + { + "name" : "DistMat", + "comment" : "(LoDTensor or Tensor) this input is a 2-D LoDTensor with shape [K, M]. It is pair-wise distance matrix between the entities represented by each row and each column. For example, assumed one entity is A with shape [K], another entity is B with shape [M]. The DistMat[i][j] is the distance between A[i] and B[j]. The bigger the distance is, the better macthing the pairs are. Please note, This tensor can contain LoD information to represent a batch of inputs. One instance of this batch can contain different numbers of entities.", + "duplicable" : 0, + "intermediate" : 0 + } ], + "outputs" : [ + { + "name" : "ColToRowMatchIndices", + "comment" : "(Tensor) A 2-D Tensor with shape [N, M] in int type. N is the batch size. If ColToRowMatchIndices[i][j] is -1, it means B[j] does not match any entity in i-th instance. Otherwise, it means B[j] is matched to row ColToRowMatchIndices[i][j] in i-th instance. The row number of i-th instance is saved in ColToRowMatchIndices[i][j].", + "duplicable" : 0, + "intermediate" : 0 + }, { + "name" : "ColToRowMatchDis", + "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]", + "duplicable" : 0, + "intermediate" : 0 + } ], + "attrs" : [ ] },{ "type" : "lrn", "comment" : "\nLocal Response Normalization Operator.\n\nThis operator comes from the paper:\n<>.\n\nThe original formula is:\n\n$$\nOutput(i, x, y) = Input(i, x, y) / \\left(\nk + \\alpha \\sum\\limits^{\\min(C, c + n/2)}_{j = \\max(0, c - n/2)}\n(Input(j, x, y))^2\n\\right)^{\\beta}\n$$\n\nFunction implementation:\n\nInputs and outpus are in NCHW format, while input.shape.ndims() equals 4.\nAnd dimensions 0 ~ 3 represent batch size, feature maps, rows,\nand columns, respectively.\n\nInput and Output in the formula above is for each map(i) of one image, and\nInput(i, x, y), Output(i, x, y) represents an element in an image.\n\nC is the number of feature maps of one image. n is a hyper-parameter\nconfigured when operator is initialized. The sum in the denominator\nis the sum of the same positions in the neighboring maps.\n\n",