Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
f9ba0db3
Commit
f9ba0db3
authored
Aug 02, 2019
by
Neo Chien
Committed by
Tianqi Chen
Aug 02, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Align the naming rule for OpAttributeUnImplemented (#3695)
parent
163532bb
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
19 additions
and
19 deletions
+19
-19
nnvm/python/nnvm/frontend/darknet.py
+1
-1
nnvm/python/nnvm/frontend/mxnet.py
+2
-2
nnvm/python/nnvm/frontend/tensorflow.py
+2
-2
python/tvm/error.py
+2
-2
python/tvm/relay/frontend/caffe2.py
+2
-2
python/tvm/relay/frontend/coreml.py
+2
-2
python/tvm/relay/frontend/keras.py
+2
-2
python/tvm/relay/frontend/mxnet.py
+2
-2
python/tvm/relay/frontend/tensorflow.py
+2
-2
python/tvm/relay/frontend/tflite.py
+2
-2
No files found.
nnvm/python/nnvm/frontend/darknet.py
View file @
f9ba0db3
...
...
@@ -78,7 +78,7 @@ def _darknet_maxpooling(inputs, attrs):
"""Process the max pool 2d operation."""
kernel
=
parse_tshape
(
required_attr
(
attrs
,
'kernel'
,
'maxpool'
))
if
len
(
kernel
)
!=
1
:
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Non-2D kernels for Max Pooling are not supported in frontend Darknet.'
)
op_name
,
new_attrs
=
'max_pool2d'
,
{}
...
...
nnvm/python/nnvm/frontend/mxnet.py
View file @
f9ba0db3
...
...
@@ -32,7 +32,7 @@ def _rename(new_name):
def
_pooling
(
inputs
,
attrs
):
kernel
=
parse_tshape
(
required_attr
(
attrs
,
'kernel'
,
'pooling'
))
if
len
(
kernel
)
!=
2
:
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Non-2D kernels are not supported for Pool2D.'
)
global_pool
=
'global'
if
parse_bool_str
(
attrs
,
'global_pool'
)
else
''
pool_type
=
required_attr
(
attrs
,
'pool_type'
,
'pooling'
)
...
...
@@ -52,7 +52,7 @@ def _pooling(inputs, attrs):
def
_batch_norm
(
inputs
,
attrs
):
if
parse_bool_str
(
attrs
,
'output_mean_var'
):
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Attribute "output_mean_var" is not supported in operator batch_norm.'
)
# if parse_bool_str(attrs, 'fix_gamma'):
# _warn_not_used('fix_gamma', 'batch_norm')
...
...
nnvm/python/nnvm/frontend/tensorflow.py
View file @
f9ba0db3
...
...
@@ -84,7 +84,7 @@ def _dimension_picker(prefix, surfix=''):
kernel
=
attr
[
'kernel_shape'
]
if
len
(
kernel
)
==
2
:
return
prefix
+
'2d'
+
surfix
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Non-2D kernels are not supported for operator {}.'
.
format
(
prefix
))
return
_impl
...
...
@@ -177,7 +177,7 @@ def _pooling(name):
attr
[
'padding'
]
=
[
pad_v
[
0
],
pad_h
[
0
],
pad_v
[
1
],
pad_h
[
1
]]
else
:
msg
=
'Value {} in attribute "padding" of operator Pooling is not valid.'
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
msg
.
format
(
attr
[
'padding'
]))
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
msg
.
format
(
attr
[
'padding'
]))
if
name
==
"avg_pool"
:
attr
[
'count_include_pad'
]
=
False
...
...
python/tvm/error.py
View file @
f9ba0db3
...
...
@@ -99,14 +99,14 @@ class OpAttributeInvalid(OpError, AttributeError):
@register_error
class
OpAttributeUn
i
mplemented
(
OpError
,
NotImplementedError
):
class
OpAttributeUn
I
mplemented
(
OpError
,
NotImplementedError
):
"""Attribute is not supported in a certain frontend.
Example
-------
.. code:: python
raise OpAttributeUn
i
mplemented(
raise OpAttributeUn
I
mplemented(
"Attribute {} is not supported in operator {}".format(
attr_name, op_name))
"""
python/tvm/relay/frontend/caffe2.py
View file @
f9ba0db3
...
...
@@ -33,7 +33,7 @@ def dimension_picker(prefix, surfix=''):
kernel
=
attr
[
'kernel_shape'
]
if
len
(
kernel
)
==
2
:
return
prefix
+
'2d'
+
surfix
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Non-2D kernels are not supported for operator {}2d'
.
format
(
prefix
))
return
_impl
...
...
@@ -244,7 +244,7 @@ class Concat(Caffe2OpConverter):
return
1
if
order
==
'NHWC'
:
return
3
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Order {} is not supported in operator Concat.'
.
format
(
order
))
return
AttrCvt
(
...
...
python/tvm/relay/frontend/coreml.py
View file @
f9ba0db3
...
...
@@ -207,7 +207,7 @@ def _PoolingLayerParams(op, inexpr, etab):
else
:
msg
=
'PoolingPaddingType {} is not supported in operator Pooling.'
op_name
=
op
.
WhichOneof
(
'PoolingPaddingType'
)
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
msg
.
format
(
op_name
))
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
msg
.
format
(
op_name
))
# consume padding layer
if
etab
.
in_padding
:
...
...
@@ -280,7 +280,7 @@ def _PaddingLayerParams(op, inexpr, etab):
if
op
.
WhichOneof
(
'PaddingType'
)
==
'constant'
:
constant
=
op
.
constant
if
constant
.
value
!=
0
:
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'{} is not supported in operator Padding.'
.
format
(
constant
.
value
))
padding
=
[
b
.
startEdgeSize
for
b
in
op
.
paddingAmounts
.
borderAmounts
]
padding2
=
[
b
.
endEdgeSize
for
b
in
op
.
paddingAmounts
.
borderAmounts
]
...
...
python/tvm/relay/frontend/keras.py
View file @
f9ba0db3
...
...
@@ -242,7 +242,7 @@ def _convert_convolution(inexpr, keras_layer, etab):
else
:
msg
=
'Padding with {} is not supported for operator Convolution '
\
'in frontend Keras.'
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
msg
.
format
(
keras_layer
.
padding
))
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
msg
.
format
(
keras_layer
.
padding
))
if
is_deconv
:
out
=
_op
.
nn
.
conv2d_transpose
(
data
=
inexpr
,
**
params
)
else
:
...
...
@@ -290,7 +290,7 @@ def _convert_separable_convolution(inexpr, keras_layer, etab):
else
:
msg
=
'Padding with {} is not supported for operator Separable '
\
'Convolution in frontend Keras.'
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
msg
.
format
(
keras_layer
.
padding
))
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
msg
.
format
(
keras_layer
.
padding
))
depthconv
=
_op
.
nn
.
conv2d
(
data
=
inexpr
,
**
params0
)
# pointwise conv
...
...
python/tvm/relay/frontend/mxnet.py
View file @
f9ba0db3
...
...
@@ -143,7 +143,7 @@ def _mx_conv2d(inputs, attrs):
def
_mx_conv2d_transpose
(
inputs
,
attrs
):
if
"target_shape"
in
attrs
.
attrs
:
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Attribute "target_shape" is not supported for operator Conv2D-transpose.'
)
kernel_size
=
attrs
.
get_int_tuple
(
"kernel"
)
if
len
(
kernel_size
)
!=
2
:
...
...
@@ -222,7 +222,7 @@ def _mx_BlockGrad(inputs, attrs): #pylint: disable=unused-argument
def
_mx_batch_norm
(
inputs
,
attrs
):
if
attrs
.
get_bool
(
"output_mean_var"
,
False
):
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Attribute "output_mean_var" is not supported for operator Batch Norm.'
)
if
attrs
.
get_bool
(
"use_global_stats"
,
False
):
_warn_not_used
(
"use_global_stats"
,
"batch_norm"
)
...
...
python/tvm/relay/frontend/tensorflow.py
View file @
f9ba0db3
...
...
@@ -130,7 +130,7 @@ class AttrCvt(object):
new_attrs
=
{}
for
k
in
attrs
.
keys
():
if
k
in
self
.
_excludes
:
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Attribute {} in operator {} is not supported.'
.
format
(
k
,
op_name
))
elif
k
in
self
.
_disables
:
logging
.
warning
(
"Attribute
%
s is disabled in relay.
%
s"
,
k
,
op_name
)
...
...
@@ -517,7 +517,7 @@ def _crop_and_resize():
attrs
[
'size'
]
=
crop_size
attrs
[
'layout'
]
=
'NHWC'
if
method
.
lower
()
==
'nearest'
:
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Attribute method=nearest is not supported'
)
else
:
attrs
[
'align_corners'
]
=
True
...
...
python/tvm/relay/frontend/tflite.py
View file @
f9ba0db3
...
...
@@ -683,7 +683,7 @@ class OperatorConverter(object):
(
pad_left
,
pad_right
),
(
0
,
0
)))
else
:
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Padding format {} is not supported for operator Conv.'
.
format
(
padding
))
out
=
_op
.
nn
.
conv2d
(
data
=
in_expr
,
weight
=
weight_expr
,
**
params
)
...
...
@@ -786,7 +786,7 @@ class OperatorConverter(object):
pad_left
,
pad_right
=
get_pad_value
(
input_w
,
filter_w
,
stride_w
)
params
[
'padding'
]
=
[
pad_top
,
pad_left
,
pad_bottom
,
pad_right
]
else
:
raise
tvm
.
error
.
OpAttributeUn
i
mplemented
(
raise
tvm
.
error
.
OpAttributeUn
I
mplemented
(
'Padding format {} for operator Pool2D is not supported.'
.
format
(
padding
))
if
pool_type
==
"average"
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment