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>
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 @@
 
     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];