diff options
author | Slava Shklyaev <slavash@google.com> | 2020-03-30 17:22:40 +0100 |
---|---|---|
committer | Slava Shklyaev <slavash@google.com> | 2020-04-07 11:02:06 +0100 |
commit | d99205618ce9d1c9ba60606b5169ca0a34784232 (patch) | |
tree | ad6900bcdb1525e218e75ba730a9de70e38e7196 /nn/runtime/test/specs/V1_3/if_constant.mod.py | |
parent | f09f611195dc27d3d278da23598df679ebcd1db6 (diff) | |
download | ml-d99205618ce9d1c9ba60606b5169ca0a34784232.tar.gz |
Add operand type variations for IF tests
Bug: 149199424
Test: NNT_static
Change-Id: If6ae373876fa309580198526d44018576a4ebdd1
Diffstat (limited to 'nn/runtime/test/specs/V1_3/if_constant.mod.py')
-rw-r--r-- | nn/runtime/test/specs/V1_3/if_constant.mod.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nn/runtime/test/specs/V1_3/if_constant.mod.py b/nn/runtime/test/specs/V1_3/if_constant.mod.py index ae6750146..5f554aaeb 100644 --- a/nn/runtime/test/specs/V1_3/if_constant.mod.py +++ b/nn/runtime/test/specs/V1_3/if_constant.mod.py @@ -41,11 +41,16 @@ def Test(value, name): then_model = MakeBranchModel("ADD") else_model = MakeBranchModel("SUB") model = Model().Operation("IF", cond, then_model, else_model, x, y).To(z) + + quant8 = DataTypeConverter("quant8", scale=1.0, zeroPoint=100) + quant8_signed = DataTypeConverter("quant8_signed", scale=1.0, zeroPoint=100) + example = Example({ x: x_data, y: y_data, z: output_data[value], }, model=model, name=name) + example.AddVariations("relaxed", "float16", "int32", quant8, quant8_signed) example.DisableLifeTimeVariation() # CONSTANT_COPY |