Move dataSize field to a model level

The field is moved up one level since it must be the same for all the
inputs of one model.

Bug: 112895047
Test: benchmark + com.example.android.nn.benchmark.NNTest
Change-Id: Ia2a83d8aa5d97ae3a6d0208bf8176918cdaadf71
Merged-In: Ia2a83d8aa5d97ae3a6d0208bf8176918cdaadf71
(cherry picked from commit 5e388c7a85f8a8a16d9b606cf1f9349c66f3c5bf)
diff --git a/assets/models_list/mobilenet_imagenet_aosp.json b/assets/models_list/mobilenet_imagenet_aosp.json
index 7320731..b0dbc93 100644
--- a/assets/models_list/mobilenet_imagenet_aosp.json
+++ b/assets/models_list/mobilenet_imagenet_aosp.json
@@ -5,11 +5,11 @@
       "modelFile": "mobilenet_float",
       "baselineSec": 0.060,
       "inputSize": [1, 224, 224, 3],
+      "dataSize": 4,
       "dataset": {
           "inputPath": "imagenet_aosp/",
           "groundTruth": "imagenet_aosp/ground_truth_labels.txt",
           "labels": "imagenet_aosp/labels.txt",
-          "dataSize": 4,
           "evaluator": "TopK",
           "preprocessor": "Inception"
       }
@@ -19,13 +19,13 @@
       "modelFile": "mobilenet_quantized",
       "baselineSec": 0.060,
       "inputSize": [1, 224, 224, 3],
+      "dataSize": 1,
       "inputScale": 0.007812,
       "inputZeroPoint": 128.0,
       "dataset": {
           "inputPath": "imagenet_aosp",
           "groundTruth": "imagenet_aosp/ground_truth_labels.txt",
           "labels": "imagenet_aosp/labels.txt",
-          "dataSize": 1,
           "evaluator": "TopK",
           "preprocessor": "Inception"
       }
diff --git a/assets/models_list/test_models.json b/assets/models_list/test_models.json
index 640889b..7a52afc 100644
--- a/assets/models_list/test_models.json
+++ b/assets/models_list/test_models.json
@@ -5,11 +5,11 @@
       "testName": "MobileNet_FLOAT",
       "baselineSec": 0.060,
       "inputSize": [1, 224, 224, 3],
+      "dataSize": 4,
       "inputOutputs": [
         {
           "input": "mobilenet_float/cup.input",
-          "output": "mobilenet_float/cup.output",
-          "dataSize": 4
+          "output": "mobilenet_float/cup.output"
         }
       ]
     },
@@ -18,11 +18,11 @@
       "testName": "MobileNet_QUANT8",
       "baselineSec": 0.060,
       "inputSize": [1, 224, 224, 3],
+      "dataSize": 1,
       "inputOutputs": [
         {
           "input": "mobilenet_quantized/cup.input",
-          "output": "mobilenet_quantized/cup.output",
-          "dataSize": 1
+          "output": "mobilenet_quantized/cup.output"
         }
       ]
     },
@@ -30,11 +30,11 @@
       "name": "resnet_float",
       "baselineSec": 0.760,
       "inputSize": [1, 299, 299, 3],
+      "dataSize": 4,
       "inputOutputs": [
         {
           "input": "resnet_float/cup.input",
-          "output": "resnet_float/cup.output",
-          "dataSize": 4
+          "output": "resnet_float/cup.output"
         }
       ]
     },
@@ -42,11 +42,11 @@
       "name": "resnet_quantized",
       "baselineSec": 0.670,
       "inputSize": [1, 299, 299, 3],
+      "dataSize": 1,
       "inputOutputs": [
         {
           "input": "resnet_quantized/cup.input",
-          "output": "resnet_quantized/cup.output",
-          "dataSize": 1
+          "output": "resnet_quantized/cup.output"
         }
       ]
     },
@@ -55,11 +55,11 @@
       "testName": "HDRNet_FLOAT",
       "baselineSec": 0.011,
       "inputSize": [1, 256, 256, 3],
+      "dataSize": 4,
       "inputOutputs": [
         {
           "input": "hdrnet_float/cup.input",
-          "output": "hdrnet_float/cup.output",
-          "dataSize": 4
+          "output": "hdrnet_float/cup.output"
         }
       ]
     },
@@ -68,11 +68,11 @@
       "testName": "HDRNet_QUANT8",
       "baselineSec": 0.006,
       "inputSize": [1, 256, 256, 3],
+      "dataSize": 1,
       "inputOutputs": [
         {
           "input": "hdrnet_quantized/cup.input",
-          "output": "hdrnet_quantized/cup.output",
-          "dataSize": 1
+          "output": "hdrnet_quantized/cup.output"
         }
       ]
     },
@@ -81,11 +81,11 @@
       "testName": "TTS_FLOAT",
       "baselineSec": 0.004,
       "inputSize": [1, 1, 1, 334],
+      "dataSize": 4,
       "inputOutputs": [
         {
           "input": "tts_float/tts.input",
-          "output": "tts_float/tts.output",
-          "dataSize": 4
+          "output": "tts_float/tts.output"
         }
       ]
     }