diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-03-28 01:37:09 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2020-03-28 01:37:09 +0000 |
commit | 79122170b89ac4aff1a79dbaa7557893c2a7eaba (patch) | |
tree | 0d844d887dba95ff139efa1d1fff911cb57ee96e /nn/runtime/test/specs | |
parent | 787802309d8b8f55e4e62201f60d316d38d3f0c2 (diff) | |
parent | 5bb8f50fa6cdc1da5e7cb68a2673d7de625f45de (diff) | |
download | ml-79122170b89ac4aff1a79dbaa7557893c2a7eaba.tar.gz |
Merge "Fix the issue that INSTANCE_NORMALIZATION is not numerically stable." into rvc-dev
Diffstat (limited to 'nn/runtime/test/specs')
-rw-r--r-- | nn/runtime/test/specs/V1_2/instance_normalization.mod.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/nn/runtime/test/specs/V1_2/instance_normalization.mod.py b/nn/runtime/test/specs/V1_2/instance_normalization.mod.py index 48722e94d..9c45575fc 100644 --- a/nn/runtime/test/specs/V1_2/instance_normalization.mod.py +++ b/nn/runtime/test/specs/V1_2/instance_normalization.mod.py @@ -54,3 +54,15 @@ Example({ 8.0001, 7.693794, 11.9999, 12.725516 ] }).AddNchw(i2, o2, layout).AddVariations("relaxed", "float16") + + +# TEST 3: Regression test of b/151360275. +i3 = Input("in", "TENSOR_FLOAT32", "{1, 2, 2, 1}") +o3 = Output("out", "TENSOR_FLOAT32", "{1, 2, 2, 1}") +Model("large").Operation("INSTANCE_NORMALIZATION", i3, 1.0, 0.0, 0.0001, layout).To(o3) + +# Instantiate an example +Example({ + i3: [198, 198, 202, 202], + o3: [-0.9999875, -0.9999875, 0.9999875, 0.9999875] +}).AddNchw(i3, o3, layout).AddVariations("relaxed", "float16") |