Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Add function body implementation in opschema #7

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
d4ac10e
Add function body implementation in onnx opschema
Feb 13, 2019
b2e8b1c
Merge with master
Feb 13, 2019
ece2498
Fix
Feb 13, 2019
abefa29
Fix
Feb 13, 2019
b828382
Fix copy constructor and gcc warning
Feb 13, 2019
18f4e1b
Fix
Feb 14, 2019
baf04d6
Update doc genration scripts to contain function information
Feb 14, 2019
acd8767
Sync with master branch
Feb 14, 2019
00cef71
Update
Feb 14, 2019
48cc91d
Flake
Feb 14, 2019
30ef083
typecheck
Feb 14, 2019
fd25ba5
Fix header
Feb 15, 2019
7bf5c92
Add support type
Feb 15, 2019
196bb1e
Rename testcase
Feb 15, 2019
e58524e
Update documents
Feb 15, 2019
be8a12b
Fix draft comments
Feb 20, 2019
a0667f1
Sync with master
Feb 20, 2019
6a2ef1a
Update doc
Feb 20, 2019
abc815f
Move function verify test to CI
Feb 25, 2019
9a69250
Merge branch 'master' of github.com:onnx/onnx into function-op
Feb 26, 2019
18241bc
Fix and removing unused code
Feb 26, 2019
b3bb0a5
Fix
Feb 26, 2019
cdbe6b4
Remove redundant field
Feb 26, 2019
873ddbb
More extendable Runner (#1809)
postrational Feb 27, 2019
8882688
Add missed changes in proto files
Feb 27, 2019
993478b
Merge branch 'master' into function-op
Feb 27, 2019
8bc648f
fix
Feb 28, 2019
1229c74
Update __init__.py
Feb 28, 2019
279c798
Revert "Remove redundant field"
Feb 28, 2019
3b46fa1
Revert "Add missed changes in proto files"
Feb 28, 2019
96c58ce
Fix shape inference when auto_pad is notset again (#1830)
liwchang Mar 1, 2019
9c5ed17
Resolve comments
Mar 2, 2019
79fce86
Merge branch 'function-op' of github.com:raymondxyang/onnx into funct…
Mar 2, 2019
2ad193e
Merge branch 'master' into function-op
Mar 4, 2019
71e22be
Fix gcc
Mar 4, 2019
d23ea68
Resolve comments on doc
Mar 4, 2019
f6d4be9
Resolve comments
Mar 6, 2019
08be38e
Resolve comments
Mar 6, 2019
84aa344
Fix const reference
Mar 6, 2019
4d03a61
Renaming
Mar 6, 2019
a89a4a1
Remove exp op: Affine, ImageScaler,ParametricSoftplus, Crop. (#1832)
linkerzhang Mar 7, 2019
1ec81bc
Change TopK operator to allow dynamic 'k' (#1829)
hariharans29 Mar 7, 2019
67225a6
Resolve PR comments
Mar 8, 2019
d95a240
Rename function
Mar 8, 2019
1cca873
bump the version for drop out - fix the issue that the version was no…
linkerzhang Mar 8, 2019
3b0d3bb
remove global variable in header file (#1850)
houseroad Mar 8, 2019
f8576af
Resolve PR comments
Mar 8, 2019
3dbf8fe
Handle string comparision represented as np.objects (#1851)
yuslepukhin Mar 9, 2019
022af20
Merge branch 'master' into function-op
linkerzhang Mar 11, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 96 additions & 162 deletions docs/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,45 +134,6 @@ This version of the operator has been available since version 1 of the default O
<dd>Constrain input and output types to float tensors.</dd>
</dl>

### <a name="Affine-1"></a>**Affine-1**</a>

Affine takes one input data (Tensor<T>) and produces one output data
(Tensor<T>) where the affine function, y = alpha * x + beta,
is applied to the tensor elementwise.

#### Version

No versioning maintained for experimental ops.
#### Attributes

<dl>
<dt><tt>alpha</tt> : float (default is 1.0)</dt>
<dd>Value of alpha</dd>
<dt><tt>beta</tt> : float (default is 0.0)</dt>
<dd>Value of beta</dd>
</dl>

#### Inputs

<dl>
<dt><tt>X</tt> : T</dt>
<dd>1D input tensor</dd>
</dl>

#### Outputs

<dl>
<dt><tt>Y</tt> : T</dt>
<dd>1D output tensor</dd>
</dl>

#### Type Constraints

<dl>
<dt><tt>T</tt> : tensor(float16), tensor(float), tensor(double)</dt>
<dd>Constrain input and output types to float tensors.</dd>
</dl>

### <a name="And-1"></a>**And-1**</a>

Returns the tensor resulted from performing the `and` logical operation
Expand Down Expand Up @@ -739,45 +700,6 @@ This version of the operator has been available since version 1 of the default O
<dd>Constrain input and output types to float tensors.</dd>
</dl>

### <a name="Crop-1"></a>**Crop-1**</a>

Crop and image to the specified spatial dimensions. If scale is given,
then optionally start the crop offset by the left/top border amounts.
If scale is not provided, crop the borders as provided.

#### Version

No versioning maintained for experimental ops.
#### Attributes

<dl>
<dt><tt>border</tt> : list of ints</dt>
<dd>A 1-D values of (leftBorder, topBorder, rightBorder, bottomBorder).</dd>
<dt><tt>scale</tt> : list of ints</dt>
<dd>A 1-D values of (height, width).</dd>
</dl>

#### Inputs

<dl>
<dt><tt>input</tt> : T</dt>
<dd>Input tensor of shape [N,C,H,W]</dd>
</dl>

#### Outputs

<dl>
<dt><tt>output</tt> : T</dt>
<dd>Result, has same type as input, with H and W dimensions reduced.</dd>
</dl>

#### Type Constraints

<dl>
<dt><tt>T</tt> : tensor(float16), tensor(float), tensor(double)</dt>
<dd>Constrain input and output types to float tensors.</dd>
</dl>

### <a name="DepthToSpace-1"></a>**DepthToSpace-1**</a>

DepthToSpace rearranges (permutes) data from depth into blocks of spatial data.
Expand Down Expand Up @@ -1850,44 +1772,6 @@ This version of the operator has been available since version 1 of the default O
<dd>Only bool</dd>
</dl>

### <a name="ImageScaler-1"></a>**ImageScaler-1**</a>

Scale and bias the input image. Bias values are stored in
the same ordering as the image pixel format.

#### Version

No versioning maintained for experimental ops.
#### Attributes

<dl>
<dt><tt>bias</tt> : list of floats</dt>
<dd>Bias applied to each channel, same size as C.</dd>
<dt><tt>scale</tt> : float (default is 1.0)</dt>
<dd>The scale to apply.</dd>
</dl>

#### Inputs

<dl>
<dt><tt>input</tt> : T</dt>
<dd>Input tensor of shape [N,C,H,W]</dd>
</dl>

#### Outputs

<dl>
<dt><tt>output</tt> : T</dt>
<dd>Result, has same shape and type as input</dd>
</dl>

#### Type Constraints

<dl>
<dt><tt>T</tt> : tensor(float16), tensor(float), tensor(double)</dt>
<dd>Constrain input and output types to float tensors.</dd>
</dl>

### <a name="InstanceNormalization-1"></a>**InstanceNormalization-1**</a>

Carries out instance normalization as described in the paper
Expand Down Expand Up @@ -3071,45 +2955,6 @@ This version of the operator has been available since version 1 of the default O
<dd>Constrain input and output types to float tensors.</dd>
</dl>

### <a name="ParametricSoftplus-1"></a>**ParametricSoftplus-1**</a>

ParametricSoftplus takes one input data (Tensor<T>) and produces one output data
(Tensor<T>) where the softplus function, y = alpha * ln(exp(beta * x) + 1), is applied to
the tensor elementwise.

#### Version

No versioning maintained for experimental ops.
#### Attributes

<dl>
<dt><tt>alpha</tt> : float</dt>
<dd>Value of alpha</dd>
<dt><tt>beta</tt> : float</dt>
<dd>Value of beta</dd>
</dl>

#### Inputs

<dl>
<dt><tt>X</tt> : T</dt>
<dd>1D input tensor</dd>
</dl>

#### Outputs

<dl>
<dt><tt>Y</tt> : T</dt>
<dd>1D input tensor</dd>
</dl>

#### Type Constraints

<dl>
<dt><tt>T</tt> : tensor(float16), tensor(float), tensor(double)</dt>
<dd>Constrain input and output types to float tensors.</dd>
</dl>

### <a name="Pow-1"></a>**Pow-1**</a>

Pow takes input data (Tensor<T>) and exponent Tensor, and
Expand Down Expand Up @@ -4803,7 +4648,6 @@ This version of the operator has been available since version 1 of the default O
-Index tensor of shape [a_1, a_2, ..., a_{axis-1}, k, a_{axis+1}, ... a_n] which
contains the indices of the top k elements (original indices from the input
tensor).

Given two equivalent values, this operator uses the indices along the axis as
a tiebreaker. That is, the element with the lower index will appear first.

Expand Down Expand Up @@ -6976,9 +6820,9 @@ This version of the operator has been available since version 7 of the default O

### <a name="Dropout-7"></a>**Dropout-7**</a>

Dropout takes one input floating tensor and produces two tensor outputs,
output (floating tensor) and mask (`Tensor<bool>`). Depending on whether it is
in test mode or not, the output Y will either be a random dropout, or a simple
Dropout takes one input data (Tensor<float>) and produces two Tensor outputs,
output (Tensor<float>) and mask (Tensor<bool>). Depending on whether it is in
test mode or not, the output Y will either be a random dropout, or a simple
copy of the input. Note that our implementation of Dropout does scaling in
the training phase, so during testing nothing needs to be done.
This operator has **optional** inputs/outputs. See [the doc](IR.md) for more details about the representation of optional arguments. An empty string may be used in the place of an actual argument's name to indicate a missing argument. Trailing optional arguments (those not followed by an argument that is present) may also be simply omitted.
Expand Down Expand Up @@ -7006,7 +6850,7 @@ This version of the operator has been available since version 7 of the default O
<dl>
<dt><tt>output</tt> : T</dt>
<dd>The output.</dd>
<dt><tt>mask</tt> (optional) : T1</dt>
<dt><tt>mask</tt> (optional) : T</dt>
<dd>The output mask.</dd>
</dl>

Expand All @@ -7015,8 +6859,6 @@ This version of the operator has been available since version 7 of the default O
<dl>
<dt><tt>T</tt> : tensor(float16), tensor(float), tensor(double)</dt>
<dd>Constrain input and output types to float tensors.</dd>
<dt><tt>T1</tt> : tensor(bool)</dt>
<dd>Constrain output mask types to boolean tensors.</dd>
</dl>

### <a name="Equal-7"></a>**Equal-7**</a>
Expand Down Expand Up @@ -9049,6 +8891,47 @@ This version of the operator has been available since version 9 of the default O
<dd>Constrain index tensor to int64</dd>
</dl>

### <a name="MeanVarianceNormalization-9"></a>**MeanVarianceNormalization-9**</a>

A MeanVarianceNormalization Function: Perform mean variance normalization
on the input tensor X using formula: <br/> ``` (X-EX)/sqrt(E(X-EX)^2) ```

#### Version

This version of the operator has been available since version 9 of the default ONNX operator set.

#### Attributes

<dl>
<dt><tt>axes</tt> : list of ints</dt>
<dd>A list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor. Use [0,2,3] (without C axis for N-D cases) for calculating means and variances along channels. Two variables with the same C-coordinate are associated with the same mean and variance.</dd>
</dl>

#### Inputs

<dl>
<dt><tt>X</tt> : T</dt>
<dd>Input tensor</dd>
</dl>

#### Outputs

<dl>
<dt><tt>Y</tt> : T</dt>
<dd>Output tensor</dd>
</dl>

#### Type Constraints

<dl>
<dt><tt>T</tt> : tensor(float16), tensor(float), tensor(double)</dt>
<dd>Constrain input and output types to all numeric tensors.</dd>
</dl>

#### Function

The Function can be represented as a function.

### <a name="NonZero-9"></a>**NonZero-9**</a>

Returns the indices of the elements that are non-zero
Expand Down Expand Up @@ -9717,3 +9600,54 @@ This version of the operator has been available since version 10 of the default
#### Type Constraints


### <a name="TopK-10"></a>**TopK-10**</a>

Retrieve the top-K elements along a specified axis. Given an input tensor of
shape [a_1, a_2, ..., a_n, r] and integer argument k, return two outputs:
-Value tensor of shape [a_1, a_2, ..., a_{axis-1}, k, a_{axis+1}, ... a_n]
which contains the values of the top k elements along the specified axis
-Index tensor of shape [a_1, a_2, ..., a_{axis-1}, k, a_{axis+1}, ... a_n] which
contains the indices of the top k elements (original indices from the input
tensor).

Given two equivalent values, this operator uses the indices along the axis as
a tiebreaker. That is, the element with the lower index will appear first.

#### Version

This version of the operator has been available since version 10 of the default ONNX operator set.

#### Attributes

<dl>
<dt><tt>axis</tt> : int (default is -1)</dt>
<dd>Dimension on which to do the sort.</dd>
</dl>

#### Inputs

<dl>
<dt><tt>X</tt> : T</dt>
<dd>Tensor of shape [a_1, a_2, ..., a_n, r]</dd>
<dt><tt>K</tt> : tensor(int64)</dt>
<dd>A 1-D tensor containing a single positive value corresponding to the number of top elements to retrieve</dd>
</dl>

#### Outputs

<dl>
<dt><tt>Values</tt> : T</dt>
<dd>Tensor of shape [a_1, a_2, ..., a_{axis-1}, k, a_{axis+1}, ... a_n] containing top K values from the input tensor</dd>
<dt><tt>Indices</tt> : I</dt>
<dd>Tensor of shape [a_1, a_2, ..., a_{axis-1}, k, a_{axis+1}, ... a_n] containing the corresponding input tensor indices for the top K values.</dd>
</dl>

#### Type Constraints

<dl>
<dt><tt>T</tt> : tensor(float16), tensor(float), tensor(double)</dt>
<dd>Constrain input and output types to float tensors.</dd>
<dt><tt>I</tt> : tensor(int64)</dt>
<dd>Constrain index tensor to int64</dd>
</dl>

4 changes: 0 additions & 4 deletions docs/Functions-ml.md

This file was deleted.

36 changes: 0 additions & 36 deletions docs/Functions.md

This file was deleted.

5 changes: 0 additions & 5 deletions docs/FunctionsChangelog-ml.md

This file was deleted.

Loading