Skip to content

Commit

Permalink
Cherry pick onnx#799 (onnx#828)
Browse files Browse the repository at this point in the history
* Cherry picked fix on python Schema API

* Merge Rel 1.1.0 branch into master (onnx#657)

* Increase Version number for release 1.1.0

* Increase version number to 1.1.1

(cherry picked from commit ecac1c1)

* Fix some checks not ideal to onnx-ml (onnx#781)

* Fix some checks not ideal to onnx-ml

1. Need to consider cases where no default ONNX operator set exists
2. Cannot assume that value_info's are all tensors (CoreML's neural
network classifiers contain ZipMap, the they may produce Maps)

* Address comments and improve some more error messages

* Make SSA not abbreviated

* Address a comment

* a fix

(cherry picked from commit e3da0f9)

* Cherry picked updated testcases

* Cherry pick updates on testcases (1)

* Remove incorrect cases (onnx#791)

* Update the remainig cases (onnx#794)

* Fix incorrect conflict merge

* Remove unpassed testcases

* Bump up version number

* Kezhan/update ml op spec (onnx#799)

* update normalizer.

* update ml op spec.

* update traditional ops.

* update ml op doc

(cherry picked from commit bf00ae6)
  • Loading branch information
Raymond Yang authored and linkerzhang committed Apr 25, 2018
1 parent 0fb9690 commit 2f85783
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 operator set 'ai.onnx.ml'
### <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.

#### Versioning

Expand All @@ -25,8 +25,8 @@ opset_import {
<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 @@ -40,9 +40,7 @@ opset_import {

<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 @@ -85,7 +83,7 @@ opset_import {

<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 @@ -109,7 +107,7 @@ opset_import {

<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 @@ -275,7 +273,7 @@ opset_import {
#### 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 @@ -540,7 +538,7 @@ opset_import {

<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 @@ -597,7 +595,7 @@ opset_import {
<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.

#### Versioning

Expand All @@ -44,8 +44,8 @@ opset_import {
<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 @@ -59,9 +59,7 @@ opset_import {

<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 @@ -105,7 +103,7 @@ opset_import {

<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 @@ -130,7 +128,7 @@ opset_import {

<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 @@ -299,7 +297,7 @@ opset_import {
#### 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 @@ -569,7 +567,7 @@ opset_import {

<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 @@ -627,7 +625,7 @@ opset_import {
<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 2f85783

Please sign in to comment.