diff options
author | TatWai Chong <tatwai.chong@arm.com> | 2022-07-25 04:01:58 +0000 |
---|---|---|
committer | TatWai Chong <tatwai.chong@arm.com> | 2022-08-29 10:43:53 -0700 |
commit | fd62905d807b5976bea28b6d766e614c076faacf (patch) | |
tree | 09ac9ebad511a49a80888e81ec2cde5ec54696b9 /reference_model | |
parent | c1a978391b16dbbe634bc3338562066a75a6c678 (diff) | |
download | reference_model-fd62905d807b5976bea28b6d766e614c076faacf.tar.gz |
Update framework test generator to support TF/TFL conv3d.
Add a new attribute `rank` to indicate the testing dimension range of
input tensor. Also fix a minor bug in the existing conv3d simulation.
And relax rescale operator in the reference model to support 5-D input.
Change-Id: Ib42fe513831dc83eb7f9af07e011787a6c752704
Signed-off-by: TatWai Chong <tatwai.chong@arm.com>
Diffstat (limited to 'reference_model')
-rw-r--r-- | reference_model/src/ops/tensor_ops.cc | 2 | ||||
-rw-r--r-- | reference_model/src/ops/type_conversion.cc | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/reference_model/src/ops/tensor_ops.cc b/reference_model/src/ops/tensor_ops.cc index ef6dfa7..2cd94bb 100644 --- a/reference_model/src/ops/tensor_ops.cc +++ b/reference_model/src/ops/tensor_ops.cc @@ -171,7 +171,7 @@ int check_conv_attribute(tosa::TosaConvAttribute* attribute, ASSERT_MSG(conv_dimension == 2 || conv_dimension == 3, "Unsupported convolution dimension") - int32_t offset_d = 1 ? conv_dimension == 3 : 0; + int32_t offset_d = conv_dimension == 3 ? 1 : 0; int32_t ID = conv_dimension == 3 ? input_shape[1] : 1; int32_t IH = input_shape[1 + offset_d]; int32_t IW = input_shape[2 + offset_d]; diff --git a/reference_model/src/ops/type_conversion.cc b/reference_model/src/ops/type_conversion.cc index ac54932..52de2e4 100644 --- a/reference_model/src/ops/type_conversion.cc +++ b/reference_model/src/ops/type_conversion.cc @@ -29,7 +29,7 @@ OpRescale<Rank, InDtype, OutDtype>::OpRescale(SubgraphTraverser* sgt_, : GraphNode(sgt_, Op_RESCALE, id_) { setRequiredOperands(1, 1); - setRequiredRank(0, 4); + setRequiredRank(0, 6); INIT_ATTRIBUTE(Rescale); } |