Skip to content

Commit

Permalink
Kezhan/update ml op spec (onnx#799)
Browse files Browse the repository at this point in the history
* update normalizer.

* update ml op spec.

* update traditional ops.

* update ml op doc
  • Loading branch information
linkerzhang authored Apr 21, 2018
1 parent e3da0f9 commit bf00ae6
Show file tree
Hide file tree
Showing 3 changed files with 658 additions and 528 deletions.
20 changes: 9 additions & 11 deletions docs/Changelog-ml.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
## Version 1 of the 'ai.onnx.ml' operator set
### <a name="ai.onnx.ml.ArrayFeatureExtractor-1"></a>**ai.onnx.ml.ArrayFeatureExtractor-1**</a>

Select a subset of the data based on the indices passed.
Select a subset of the data X based on the indices provided Y.

#### Version

Expand All @@ -18,8 +18,8 @@ This version of the operator has been available since version 1 of the 'ai.onnx.
<dl>
<dt><tt>X</tt> : T1</dt>
<dd>Data to be selected</dd>
<dt><tt>Y</tt> : T2</dt>
<dd>The index values to select as a tensor of int64s</dd>
<dt><tt>Y</tt> : tensor(int64)</dt>
<dd>The index values to select as a int64 tensor</dd>
</dl>

#### Outputs
Expand All @@ -33,9 +33,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.

<dl>
<dt><tt>T1</tt> : tensor(float), tensor(double), tensor(int64), tensor(int32), tensor(string)</dt>
<dd> allowed types.</dd>
<dt><tt>T2</tt> : tensor(int64)</dt>
<dd> Index value types .</dd>
<dd>allowed types.</dd>
</dl>

### <a name="ai.onnx.ml.Binarizer-1"></a>**ai.onnx.ml.Binarizer-1**</a>
Expand Down Expand Up @@ -71,7 +69,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.

<dl>
<dt><tt>T</tt> : tensor(float), tensor(double), tensor(int64), tensor(int32)</dt>
<dd> allowed types.</dd>
<dd>allowed types.</dd>
</dl>

### <a name="ai.onnx.ml.CastMap-1"></a>**ai.onnx.ml.CastMap-1**</a>
Expand All @@ -88,7 +86,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.

<dl>
<dt><tt>cast_to</tt> : string</dt>
<dd>what to cast output to, enum 'TO_FLOAT', 'TO_STRING', 'TO_INT64', default is 'TO_FLOAT'</dd>
<dd>what type of tensor to cast the input to, enum 'TO_FLOAT','TO_STRING','TO_INT64', default is 'TO_FLOAT'</dd>
<dt><tt>map_form</tt> : string</dt>
<dd>whether to only output as many values as are in the input, or position the input based on using the key of the map as the index of the output (sparse), enum 'DENSE', 'SPARSE', default is 'DENSE'</dd>
<dt><tt>max_map</tt> : int</dt>
Expand Down Expand Up @@ -233,7 +231,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.
#### Attributes

<dl>
<dt><tt>inputdimensions</tt> : int</dt>
<dt><tt>inputdimensions</tt> : list of ints</dt>
<dd>the size of each input in the input list</dd>
</dl>

Expand Down Expand Up @@ -463,7 +461,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.

<dl>
<dt><tt>norm</tt> : string</dt>
<dd>0=Lmax, 1=L1, 2=L2</dd>
<dd>enum 'MAX', 'L1', 'L2'</dd>
</dl>

#### Inputs
Expand Down Expand Up @@ -513,7 +511,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.
<dt><tt>cats_strings</tt> : list of strings</dt>
<dd>list of categories, strings</dd>
<dt><tt>zeros</tt> : int</dt>
<dd>if true and category is not present, will return all zeros, if false and missing category, operator will return false</dd>
<dd>if true and category is not present, will return all zeros, if false and missing category, operator will return false. Default is true (1).</dd>
</dl>

#### Inputs
Expand Down
20 changes: 9 additions & 11 deletions docs/Operators-ml.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
## ai.onnx.ml
### <a name="ai.onnx.ml.ArrayFeatureExtractor"></a><a name="ai.onnx.ml.arrayfeatureextractor">**ai.onnx.ml.ArrayFeatureExtractor**</a>

Select a subset of the data based on the indices passed.
Select a subset of the data X based on the indices provided Y.

#### Version

Expand All @@ -37,8 +37,8 @@ This version of the operator has been available since version 1 of the 'ai.onnx.
<dl>
<dt><tt>X</tt> : T1</dt>
<dd>Data to be selected</dd>
<dt><tt>Y</tt> : T2</dt>
<dd>The index values to select as a tensor of int64s</dd>
<dt><tt>Y</tt> : tensor(int64)</dt>
<dd>The index values to select as a int64 tensor</dd>
</dl>

#### Outputs
Expand All @@ -52,9 +52,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.

<dl>
<dt><tt>T1</tt> : tensor(float), tensor(double), tensor(int64), tensor(int32), tensor(string)</dt>
<dd> allowed types.</dd>
<dt><tt>T2</tt> : tensor(int64)</dt>
<dd> Index value types .</dd>
<dd>allowed types.</dd>
</dl>


Expand Down Expand Up @@ -91,7 +89,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.

<dl>
<dt><tt>T</tt> : tensor(float), tensor(double), tensor(int64), tensor(int32)</dt>
<dd> allowed types.</dd>
<dd>allowed types.</dd>
</dl>


Expand All @@ -109,7 +107,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.

<dl>
<dt><tt>cast_to</tt> : string</dt>
<dd>what to cast output to, enum 'TO_FLOAT', 'TO_STRING', 'TO_INT64', default is 'TO_FLOAT'</dd>
<dd>what type of tensor to cast the input to, enum 'TO_FLOAT','TO_STRING','TO_INT64', default is 'TO_FLOAT'</dd>
<dt><tt>map_form</tt> : string</dt>
<dd>whether to only output as many values as are in the input, or position the input based on using the key of the map as the index of the output (sparse), enum 'DENSE', 'SPARSE', default is 'DENSE'</dd>
<dt><tt>max_map</tt> : int</dt>
Expand Down Expand Up @@ -257,7 +255,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.
#### Attributes

<dl>
<dt><tt>inputdimensions</tt> : int</dt>
<dt><tt>inputdimensions</tt> : list of ints</dt>
<dd>the size of each input in the input list</dd>
</dl>

Expand Down Expand Up @@ -492,7 +490,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.

<dl>
<dt><tt>norm</tt> : string</dt>
<dd>0=Lmax, 1=L1, 2=L2</dd>
<dd>enum 'MAX', 'L1', 'L2'</dd>
</dl>

#### Inputs
Expand Down Expand Up @@ -543,7 +541,7 @@ This version of the operator has been available since version 1 of the 'ai.onnx.
<dt><tt>cats_strings</tt> : list of strings</dt>
<dd>list of categories, strings</dd>
<dt><tt>zeros</tt> : int</dt>
<dd>if true and category is not present, will return all zeros, if false and missing category, operator will return false</dd>
<dd>if true and category is not present, will return all zeros, if false and missing category, operator will return false. Default is true (1).</dd>
</dl>

#### Inputs
Expand Down
Loading

0 comments on commit bf00ae6

Please sign in to comment.