Skip to content

Commit

Permalink
[Relay][Frontend][ONNX] Remove the 'try catch' block
Browse files Browse the repository at this point in the history
  • Loading branch information
cchung100m committed Nov 14, 2019
1 parent 86d1cb7 commit 131c9ec
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/python/frontend/onnx/test_forward.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,7 @@ def verify_depth_to_space(inshape, outshape, mode, blockSize):
node = onnx.helper.make_node('DepthToSpace',
inputs=['x'],
outputs=['y'],
blocksize=blockSize,
mode=mode)
blocksize=blockSize)

graph = helper.make_graph([node],
"depth_to_space_test",
Expand All @@ -164,12 +163,11 @@ def verify_depth_to_space(inshape, outshape, mode, blockSize):


def test_depth_to_space():
# CRD mode
# current onnx.checker use OpSet-1 version of DepthToSpace, which doesn't have a mode argument.
# TO-DO, we can add mode arguement to test CRD mode and DCR mode
# in the future when we update to a newer onnx version.
verify_depth_to_space((1, 8, 2, 3), (1, 2, 4, 6), mode="CRD", blockSize=2)

# DCR mode
verify_depth_to_space((1, 8, 2, 3), (1, 2, 4, 6), mode="DCR", blockSize=2)


def verify_space_to_depth(inshape, outshape, blockSize):
node = onnx.helper.make_node('SpaceToDepth',
Expand Down

0 comments on commit 131c9ec

Please sign in to comment.