tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

averagePool2d.https.any.js (71909B)


      1 // META: title=test WebNN API averagePool2d operation
      2 // META: global=window
      3 // META: variant=?cpu
      4 // META: variant=?gpu
      5 // META: variant=?npu
      6 // META: script=../resources/utils.js
      7 // META: timeout=long
      8 
      9 'use strict';
     10 
     11 // https://www.w3.org/TR/webnn/#api-mlgraphbuilder-pool2d
     12 // Compute a pooling operation across all the elements within the moving window
     13 // over the input tensor.
     14 //
     15 // enum MLRoundingType {
     16 //   "floor",
     17 //   "ceil"
     18 // };
     19 //
     20 // dictionary MLPool2dOptions {
     21 //   sequence<[EnforceRange] unsigned long> windowDimensions;
     22 //   sequence<[EnforceRange] unsigned long> padding;
     23 //   sequence<[EnforceRange] unsigned long> strides;
     24 //   sequence<[EnforceRange] unsigned long> dilations;
     25 //   MLInputOperandLayout layout = "nchw";
     26 //   MLRoundingType roundingType = "floor";
     27 //   sequence<[EnforceRange] unsigned long> outputSizes;
     28 // };
     29 //
     30 // MLOperand averagePool2d(
     31 //     MLOperand input, optional MLPool2dOptions options = {});
     32 
     33 const averagePool2dTests = [
     34  // float32 tests
     35  {
     36    'name':
     37        'averagePool2d float32 4D constant tensor all positive default options',
     38    'graph': {
     39      'inputs': {
     40        'averagePool2dInput': {
     41          'data': [
     42            22.975555419921875, 78.15438079833984,  9.686111450195312,
     43            51.298038482666016, 32.193084716796875, 87.65037536621094,
     44            87.25082397460938,  39.49794006347656,  80.0996322631836,
     45            10.220142364501953, 52.602699279785156, 1.4128639698028564,
     46            11.95406436920166,  85.00074768066406,  64.78374481201172,
     47            88.03128814697266,  11.333850860595703, 70.61659240722656,
     48            84.90442657470703,  79.06687927246094,  7.3287248611450195,
     49            35.97796630859375,  10.177306175231934, 1.4140757322311401,
     50            78.10037994384766,  91.59549713134766,  65.64701080322266,
     51            55.14215087890625,  18.432437896728516, 49.34624099731445,
     52            15.648024559020996, 68.02723693847656,  20.342548370361328,
     53            26.727949142456055, 64.87446594238281,  46.5671501159668,
     54            79.57833099365234,  4.33846378326416,   38.183837890625,
     55            45.25398254394531,  80.9718017578125,   67.58124542236328,
     56            6.0264997482299805, 29.7788143157959,   58.58993148803711,
     57            2.2384984493255615, 14.50549030303955,  68.72449493408203,
     58            76.45657348632812,  23.53263282775879
     59          ],
     60          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'},
     61          'constant': true
     62        }
     63      },
     64      'operators': [{
     65        'name': 'averagePool2d',
     66        'arguments': [{'input': 'averagePool2dInput'}],
     67        'outputs': 'averagePool2dOutput'
     68      }],
     69      'expectedOutputs': {
     70        'averagePool2dOutput': {
     71          'data': [47.26926803588867, 44.72445297241211],
     72          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
     73        }
     74      }
     75    }
     76  },
     77  {
     78    'name': 'averagePool2d float32 4D tensor all positive default options',
     79    'graph': {
     80      'inputs': {
     81        'averagePool2dInput': {
     82          'data': [
     83            22.975555419921875, 78.15438079833984,  9.686111450195312,
     84            51.298038482666016, 32.193084716796875, 87.65037536621094,
     85            87.25082397460938,  39.49794006347656,  80.0996322631836,
     86            10.220142364501953, 52.602699279785156, 1.4128639698028564,
     87            11.95406436920166,  85.00074768066406,  64.78374481201172,
     88            88.03128814697266,  11.333850860595703, 70.61659240722656,
     89            84.90442657470703,  79.06687927246094,  7.3287248611450195,
     90            35.97796630859375,  10.177306175231934, 1.4140757322311401,
     91            78.10037994384766,  91.59549713134766,  65.64701080322266,
     92            55.14215087890625,  18.432437896728516, 49.34624099731445,
     93            15.648024559020996, 68.02723693847656,  20.342548370361328,
     94            26.727949142456055, 64.87446594238281,  46.5671501159668,
     95            79.57833099365234,  4.33846378326416,   38.183837890625,
     96            45.25398254394531,  80.9718017578125,   67.58124542236328,
     97            6.0264997482299805, 29.7788143157959,   58.58993148803711,
     98            2.2384984493255615, 14.50549030303955,  68.72449493408203,
     99            76.45657348632812,  23.53263282775879
    100          ],
    101          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    102        }
    103      },
    104      'operators': [{
    105        'name': 'averagePool2d',
    106        'arguments': [{'input': 'averagePool2dInput'}],
    107        'outputs': 'averagePool2dOutput'
    108      }],
    109      'expectedOutputs': {
    110        'averagePool2dOutput': {
    111          'data': [47.26926803588867, 44.72445297241211],
    112          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
    113        }
    114      }
    115    }
    116  },
    117  {
    118    'name': 'averagePool2d float32 4D tensor all negative default options',
    119    'graph': {
    120      'inputs': {
    121        'averagePool2dInput': {
    122          'data': [
    123            -83.87757873535156,  -2.0740277767181396, -7.561108589172363,
    124            -45.274261474609375, -16.36655616760254,  -44.908512115478516,
    125            -42.04186248779297,  -44.77231979370117,  -1.5066279172897339,
    126            -52.65203857421875,  -92.01856231689453,  -48.004093170166016,
    127            -61.522972106933594, -93.44403839111328,  -25.780330657958984,
    128            -95.51873779296875,  -10.963757514953613, -59.132747650146484,
    129            -32.60173797607422,  -21.4510440826416,   -87.115966796875,
    130            -61.326114654541016, -41.989723205566406, -87.8764877319336,
    131            -71.69316101074219,  -80.24160766601562,  -97.48886108398438,
    132            -75.89422607421875,  -45.08991622924805,  -88.27134704589844,
    133            -90.71282958984375,  -93.32392120361328,  -59.14753341674805,
    134            -45.33106231689453,  -51.32562255859375,  -31.154796600341797,
    135            -31.62424087524414,  -62.80168151855469,  -63.558509826660156,
    136            -68.96183013916016,  -43.09415054321289,  -15.803443908691406,
    137            -64.31092071533203,  -66.45872497558594,  -42.027252197265625,
    138            -26.032955169677734, -22.73752784729004,  -70.32036590576172,
    139            -85.28227996826172,  -92.10668182373047
    140          ],
    141          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    142        }
    143      },
    144      'operators': [{
    145        'name': 'averagePool2d',
    146        'arguments': [{'input': 'averagePool2dInput'}],
    147        'outputs': 'averagePool2dOutput'
    148      }],
    149      'expectedOutputs': {
    150        'averagePool2dOutput': {
    151          'data': [-49.258975982666016, -60.52408981323242],
    152          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
    153        }
    154      }
    155    }
    156  },
    157  {
    158    'name': 'averagePool2d float32 4D tensor options.windowDimensions',
    159    'graph': {
    160      'inputs': {
    161        'averagePool2dInput': {
    162          'data': [
    163            22.975555419921875, 78.15438079833984,  9.686111450195312,
    164            51.298038482666016, 32.193084716796875, 87.65037536621094,
    165            87.25082397460938,  39.49794006347656,  80.0996322631836,
    166            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    167            11.95406436920166,  85.00074768066406,  64.78374481201172,
    168            88.03128814697266,  11.333850860595703, 70.61659240722656,
    169            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    170            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    171            78.10037994384766,  91.59549713134766,  65.64701080322266,
    172            55.14215087890625,  18.432437896728516, 49.34624099731445,
    173            15.648024559020996, 68.02723693847656,  20.342548370361328,
    174            26.727949142456055, 64.87446594238281,  46.5671501159668,
    175            79.57833099365234,  4.33846378326416,   38.183837890625,
    176            45.25398254394531,  80.9718017578125,   67.58124542236328,
    177            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    178            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    179            76.45657348632812,  23.53263282775879
    180          ],
    181          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    182        }
    183      },
    184      'operators': [{
    185        'name': 'averagePool2d',
    186        'arguments': [
    187          {'input': 'averagePool2dInput'},
    188          {'options': {'windowDimensions': [3, 3]}}
    189        ],
    190        'outputs': 'averagePool2dOutput'
    191      }],
    192      'expectedOutputs': {
    193        'averagePool2dOutput': {
    194          'data': [
    195            43.46498107910156, 49.37273406982422, 42.7481689453125,
    196            50.038944244384766, 52.452327728271484, 58.46046447753906,
    197            32.15948486328125, 34.75465393066406, 54.00202560424805,
    198            49.65404510498047, 41.824440002441406, 35.84912109375,
    199            43.23125457763672, 37.842769622802734, 32.67961120605469,
    200            41.17021942138672, 42.79708480834961, 38.987247467041016
    201          ],
    202          'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
    203        }
    204      }
    205    }
    206  },
    207  {
    208    'name':
    209        'global averagePool2d float32 4D tensor all positive options.windowDimensions',
    210    'graph': {
    211      'inputs': {
    212        'averagePool2dInput': {
    213          'data': [
    214            22.975555419921875, 78.15438079833984,  9.686111450195312,
    215            51.298038482666016, 32.193084716796875, 87.65037536621094,
    216            87.25082397460938,  39.49794006347656,  80.0996322631836,
    217            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    218            11.95406436920166,  85.00074768066406,  64.78374481201172,
    219            88.03128814697266,  11.333850860595703, 70.61659240722656,
    220            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    221            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    222            78.10037994384766,  91.59549713134766,  65.64701080322266,
    223            55.14215087890625,  18.432437896728516, 49.34624099731445,
    224            15.648024559020996, 68.02723693847656,  20.342548370361328,
    225            26.727949142456055, 64.87446594238281,  46.5671501159668,
    226            79.57833099365234,  4.33846378326416,   38.183837890625,
    227            45.25398254394531,  80.9718017578125,   67.58124542236328,
    228            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    229            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    230            76.45657348632812,  23.53263282775879
    231          ],
    232          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    233        }
    234      },
    235      'operators': [{
    236        'name': 'averagePool2d',
    237        'arguments': [
    238          {'input': 'averagePool2dInput'},
    239          {'options': {'windowDimensions': [5, 5]}}
    240        ],
    241        'outputs': 'averagePool2dOutput'
    242      }],
    243      'expectedOutputs': {
    244        'averagePool2dOutput': {
    245          'data': [47.26926803588867, 44.72445297241211],
    246          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
    247        }
    248      }
    249    }
    250  },
    251  {
    252    'name': 'averagePool2d float32 4D tensor options.padding',
    253    'graph': {
    254      'inputs': {
    255        'averagePool2dInput': {
    256          'data': [
    257            22.975555419921875, 78.15438079833984,  9.686111450195312,
    258            51.298038482666016, 32.193084716796875, 87.65037536621094,
    259            87.25082397460938,  39.49794006347656,  80.0996322631836,
    260            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    261            11.95406436920166,  85.00074768066406,  64.78374481201172,
    262            88.03128814697266,  11.333850860595703, 70.61659240722656,
    263            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    264            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    265            78.10037994384766,  91.59549713134766,  65.64701080322266,
    266            55.14215087890625,  18.432437896728516, 49.34624099731445,
    267            15.648024559020996, 68.02723693847656,  20.342548370361328,
    268            26.727949142456055, 64.87446594238281,  46.5671501159668,
    269            79.57833099365234,  4.33846378326416,   38.183837890625,
    270            45.25398254394531,  80.9718017578125,   67.58124542236328,
    271            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    272            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    273            76.45657348632812,  23.53263282775879
    274          ],
    275          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    276        }
    277      },
    278      'operators': [{
    279        'name': 'averagePool2d',
    280        'arguments': [
    281          {'input': 'averagePool2dInput'},
    282          {'options': {'padding': [1, 0, 0, 1]}}
    283        ],
    284        'outputs': 'averagePool2dOutput'
    285      }],
    286      'expectedOutputs': {
    287        'averagePool2dOutput': {
    288          'data': [
    289            52.43666076660156, 49.84208297729492, 47.26926803588867,
    290            46.15715408325195, 46.63268280029297, 43.616947174072266,
    291            44.72445297241211, 44.05451583862305
    292          ],
    293          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
    294        }
    295      }
    296    }
    297  },
    298  {
    299    'name': 'averagePool2d float32 4D tensor options.strides',
    300    'graph': {
    301      'inputs': {
    302        'averagePool2dInput': {
    303          'data': [
    304            22.975555419921875, 78.15438079833984,  9.686111450195312,
    305            51.298038482666016, 32.193084716796875, 87.65037536621094,
    306            87.25082397460938,  39.49794006347656,  80.0996322631836,
    307            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    308            11.95406436920166,  85.00074768066406,  64.78374481201172,
    309            88.03128814697266,  11.333850860595703, 70.61659240722656,
    310            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    311            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    312            78.10037994384766,  91.59549713134766,  65.64701080322266,
    313            55.14215087890625,  18.432437896728516, 49.34624099731445,
    314            15.648024559020996, 68.02723693847656,  20.342548370361328,
    315            26.727949142456055, 64.87446594238281,  46.5671501159668,
    316            79.57833099365234,  4.33846378326416,   38.183837890625,
    317            45.25398254394531,  80.9718017578125,   67.58124542236328,
    318            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    319            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    320            76.45657348632812,  23.53263282775879
    321          ],
    322          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    323        }
    324      },
    325      'operators': [{
    326        'name': 'averagePool2d',
    327        'arguments': [
    328          {'input': 'averagePool2dInput'},
    329          {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
    330        ],
    331        'outputs': 'averagePool2dOutput'
    332      }],
    333      'expectedOutputs': {
    334        'averagePool2dOutput': {
    335          'data': [
    336            43.46498107910156, 42.7481689453125, 32.15948486328125,
    337            54.00202560424805, 49.65404510498047, 35.84912109375,
    338            41.17021942138672, 38.987247467041016
    339          ],
    340          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
    341        }
    342      }
    343    }
    344  },
    345  {
    346    'name': 'averagePool2d float32 4D tensor options.dilations',
    347    'graph': {
    348      'inputs': {
    349        'averagePool2dInput': {
    350          'data': [
    351            22.975555419921875, 78.15438079833984,  9.686111450195312,
    352            51.298038482666016, 32.193084716796875, 87.65037536621094,
    353            87.25082397460938,  39.49794006347656,  80.0996322631836,
    354            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    355            11.95406436920166,  85.00074768066406,  64.78374481201172,
    356            88.03128814697266,  11.333850860595703, 70.61659240722656,
    357            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    358            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    359            78.10037994384766,  91.59549713134766,  65.64701080322266,
    360            55.14215087890625,  18.432437896728516, 49.34624099731445,
    361            15.648024559020996, 68.02723693847656,  20.342548370361328,
    362            26.727949142456055, 64.87446594238281,  46.5671501159668,
    363            79.57833099365234,  4.33846378326416,   38.183837890625,
    364            45.25398254394531,  80.9718017578125,   67.58124542236328,
    365            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    366            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    367            76.45657348632812,  23.53263282775879
    368          ],
    369          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    370        }
    371      },
    372      'operators': [{
    373        'name': 'averagePool2d',
    374        'arguments': [
    375          {'input': 'averagePool2dInput'},
    376          {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
    377        ],
    378        'outputs': 'averagePool2dOutput'
    379      }],
    380      'expectedOutputs': {
    381        'averagePool2dOutput': {
    382          'data': [32.2001838684082, 42.971012115478516],
    383          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
    384        }
    385      }
    386    }
    387  },
    388  {
    389    'name': 'averagePool2d float32 4D tensor options.layout=nchw',
    390    'graph': {
    391      'inputs': {
    392        'averagePool2dInput': {
    393          'data': [
    394            22.975555419921875, 78.15438079833984,  9.686111450195312,
    395            51.298038482666016, 32.193084716796875, 87.65037536621094,
    396            87.25082397460938,  39.49794006347656,  80.0996322631836,
    397            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    398            11.95406436920166,  85.00074768066406,  64.78374481201172,
    399            88.03128814697266,  11.333850860595703, 70.61659240722656,
    400            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    401            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    402            78.10037994384766,  91.59549713134766,  65.64701080322266,
    403            55.14215087890625,  18.432437896728516, 49.34624099731445,
    404            15.648024559020996, 68.02723693847656,  20.342548370361328,
    405            26.727949142456055, 64.87446594238281,  46.5671501159668,
    406            79.57833099365234,  4.33846378326416,   38.183837890625,
    407            45.25398254394531,  80.9718017578125,   67.58124542236328,
    408            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    409            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    410            76.45657348632812,  23.53263282775879
    411          ],
    412          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    413        }
    414      },
    415      'operators': [{
    416        'name': 'averagePool2d',
    417        'arguments':
    418            [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nchw'}}],
    419        'outputs': 'averagePool2dOutput'
    420      }],
    421      'expectedOutputs': {
    422        'averagePool2dOutput': {
    423          'data': [47.26926803588867, 44.72445297241211],
    424          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float32'}
    425        }
    426      }
    427    }
    428  },
    429  {
    430    'name': 'averagePool2d float32 4D tensor options.layout=nhwc',
    431    'graph': {
    432      'inputs': {
    433        'averagePool2dInput': {
    434          'data': [
    435            22.975555419921875, 91.59549713134766,  78.15438079833984,
    436            65.64701080322266,  9.686111450195312,  55.14215087890625,
    437            51.298038482666016, 18.432437896728516, 32.193084716796875,
    438            49.34624099731445,  87.65037536621094,  15.648024559020996,
    439            87.25082397460938,  68.02723693847656,  39.49794006347656,
    440            20.342548370361328, 80.0996322631836,   26.727949142456055,
    441            10.220142364501953, 64.87446594238281,  52.602699279785156,
    442            46.5671501159668,   1.4128639698028564, 79.57833099365234,
    443            11.95406436920166,  4.33846378326416,   85.00074768066406,
    444            38.183837890625,    64.78374481201172,  45.25398254394531,
    445            88.03128814697266,  80.9718017578125,   11.333850860595703,
    446            67.58124542236328,  70.61659240722656,  6.0264997482299805,
    447            84.90442657470703,  29.7788143157959,   79.06687927246094,
    448            58.58993148803711,  7.3287248611450195, 2.2384984493255615,
    449            35.97796630859375,  14.50549030303955,  10.177306175231934,
    450            68.72449493408203,  1.4140757322311401, 76.45657348632812,
    451            78.10037994384766,  23.53263282775879
    452          ],
    453          'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
    454        }
    455      },
    456      'operators': [{
    457        'name': 'averagePool2d',
    458        'arguments':
    459            [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nhwc'}}],
    460        'outputs': 'averagePool2dOutput'
    461      }],
    462      'expectedOutputs': {
    463        'averagePool2dOutput': {
    464          'data': [47.26926803588867, 44.72445297241211],
    465          'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
    466        }
    467      }
    468    }
    469  },
    470  {
    471    'name':
    472        'global averagePool2d float32 4D tensor options.layout=nhwc and options.windowDimensions',
    473    'graph': {
    474      'inputs': {
    475        'averagePool2dInput': {
    476          'data': [
    477            22.975555419921875, 91.59549713134766,  78.15438079833984,
    478            65.64701080322266,  9.686111450195312,  55.14215087890625,
    479            51.298038482666016, 18.432437896728516, 32.193084716796875,
    480            49.34624099731445,  87.65037536621094,  15.648024559020996,
    481            87.25082397460938,  68.02723693847656,  39.49794006347656,
    482            20.342548370361328, 80.0996322631836,   26.727949142456055,
    483            10.220142364501953, 64.87446594238281,  52.602699279785156,
    484            46.5671501159668,   1.4128639698028564, 79.57833099365234,
    485            11.95406436920166,  4.33846378326416,   85.00074768066406,
    486            38.183837890625,    64.78374481201172,  45.25398254394531,
    487            88.03128814697266,  80.9718017578125,   11.333850860595703,
    488            67.58124542236328,  70.61659240722656,  6.0264997482299805,
    489            84.90442657470703,  29.7788143157959,   79.06687927246094,
    490            58.58993148803711,  7.3287248611450195, 2.2384984493255615,
    491            35.97796630859375,  14.50549030303955,  10.177306175231934,
    492            68.72449493408203,  1.4140757322311401, 76.45657348632812,
    493            78.10037994384766,  23.53263282775879
    494          ],
    495          'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
    496        }
    497      },
    498      'operators': [{
    499        'name': 'averagePool2d',
    500        'arguments': [
    501          {'input': 'averagePool2dInput'},
    502          {'options': {'windowDimensions': [5, 5], 'layout': 'nhwc'}}
    503        ],
    504        'outputs': 'averagePool2dOutput'
    505      }],
    506      'expectedOutputs': {
    507        'averagePool2dOutput': {
    508          'data': [47.26926803588867, 44.72445297241211],
    509          'descriptor': {shape: [1, 1, 1, 2], dataType: 'float32'}
    510        }
    511      }
    512    }
    513  },
    514  {
    515    'name': 'averagePool2d float32 4D tensor options.roundingType=floor',
    516    'graph': {
    517      'inputs': {
    518        'averagePool2dInput': {
    519          'data': [
    520            22.975555419921875, 78.15438079833984,  9.686111450195312,
    521            51.298038482666016, 32.193084716796875, 87.65037536621094,
    522            87.25082397460938,  39.49794006347656,  80.0996322631836,
    523            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    524            11.95406436920166,  85.00074768066406,  64.78374481201172,
    525            88.03128814697266,  11.333850860595703, 70.61659240722656,
    526            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    527            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    528            78.10037994384766,  91.59549713134766,  65.64701080322266,
    529            55.14215087890625,  18.432437896728516, 49.34624099731445,
    530            15.648024559020996, 68.02723693847656,  20.342548370361328,
    531            26.727949142456055, 64.87446594238281,  46.5671501159668,
    532            79.57833099365234,  4.33846378326416,   38.183837890625,
    533            45.25398254394531,  80.9718017578125,   67.58124542236328,
    534            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    535            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    536            76.45657348632812,  23.53263282775879
    537          ],
    538          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    539        }
    540      },
    541      'operators': [{
    542        'name': 'averagePool2d',
    543        'arguments': [
    544          {'input': 'averagePool2dInput'}, {
    545            'options': {
    546              'windowDimensions': [3, 3],
    547              'padding': [1, 0, 0, 1],
    548              'strides': [2, 2],
    549              'roundingType': 'floor'
    550            }
    551          }
    552        ],
    553        'outputs': 'averagePool2dOutput'
    554      }],
    555      'expectedOutputs': {
    556        'averagePool2dOutput': {
    557          'data': [
    558            54.20252990722656, 37.16582489013672, 50.038944244384766,
    559            58.46046447753906, 52.73374557495117, 39.1442985534668,
    560            43.23125457763672, 32.67961120605469
    561          ],
    562          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
    563        }
    564      }
    565    }
    566  },
    567  {
    568    'name': 'averagePool2d float32 4D tensor options.roundingType=ceil',
    569    'graph': {
    570      'inputs': {
    571        'averagePool2dInput': {
    572          'data': [
    573            22.975555419921875, 78.15438079833984,  9.686111450195312,
    574            51.298038482666016, 32.193084716796875, 87.65037536621094,
    575            87.25082397460938,  39.49794006347656,  80.0996322631836,
    576            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    577            11.95406436920166,  85.00074768066406,  64.78374481201172,
    578            88.03128814697266,  11.333850860595703, 70.61659240722656,
    579            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    580            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    581            78.10037994384766,  91.59549713134766,  65.64701080322266,
    582            55.14215087890625,  18.432437896728516, 49.34624099731445,
    583            15.648024559020996, 68.02723693847656,  20.342548370361328,
    584            26.727949142456055, 64.87446594238281,  46.5671501159668,
    585            79.57833099365234,  4.33846378326416,   38.183837890625,
    586            45.25398254394531,  80.9718017578125,   67.58124542236328,
    587            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    588            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    589            76.45657348632812,  23.53263282775879
    590          ],
    591          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    592        }
    593      },
    594      'operators': [{
    595        'name': 'averagePool2d',
    596        'arguments': [
    597          {'input': 'averagePool2dInput'}, {
    598            'options': {
    599              'windowDimensions': [3, 3],
    600              'padding': [1, 0, 0, 1],
    601              'strides': [2, 2],
    602              'roundingType': 'ceil'
    603            }
    604          }
    605        ],
    606        'outputs': 'averagePool2dOutput'
    607      }],
    608      'expectedOutputs': {
    609        'averagePool2dOutput': {
    610          'data': [
    611            54.20252990722656, 37.16582489013672, 21.206613540649414,
    612            50.038944244384766, 58.46046447753906, 51.3569221496582,
    613            37.24428939819336, 54.04661178588867, 78.58363342285156,
    614            52.73374557495117, 39.1442985534668, 57.1103515625,
    615            43.23125457763672, 32.67961120605469, 56.23945999145508,
    616            40.00800323486328, 43.85149002075195, 41.061283111572266
    617          ],
    618          'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
    619        }
    620      }
    621    }
    622  },
    623  {
    624    'name':
    625        'averagePool2d float32 4D tensor options.roundingType=ceil and no padding',
    626    'graph': {
    627      'inputs': {
    628        'averagePool2dInput': {
    629          'data': [
    630            22.975555419921875, 78.15438079833984,  9.686111450195312,
    631            51.298038482666016, 32.193084716796875, 87.65037536621094,
    632            87.25082397460938,  39.49794006347656,  80.0996322631836,
    633            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    634            11.95406436920166,  85.00074768066406,  64.78374481201172,
    635            88.03128814697266,  11.333850860595703, 70.61659240722656,
    636            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    637            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    638            78.10037994384766,  91.59549713134766,  65.64701080322266,
    639            55.14215087890625,  18.432437896728516, 49.34624099731445,
    640            15.648024559020996, 68.02723693847656
    641          ],
    642          'descriptor': {shape: [1, 2, 4, 4], dataType: 'float32'}
    643        }
    644      },
    645      'operators': [{
    646        'name': 'averagePool2d',
    647        'arguments': [
    648          {'input': 'averagePool2dInput'}, {
    649            'options': {
    650              'windowDimensions': [3, 3],
    651              'strides': [2, 2],
    652              'roundingType': 'ceil'
    653            }
    654          }
    655        ],
    656        'outputs': 'averagePool2dOutput'
    657      }],
    658      'expectedOutputs': {
    659        'averagePool2dOutput': {
    660          'data': [
    661            51.20364761352539, 40.29140853881836, 50.77684020996094,
    662            51.70764923095703, 50.63130187988281, 49.3919792175293,
    663            53.128265380859375, 51.11610412597656
    664          ],
    665          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
    666        }
    667      }
    668    }
    669  },
    670  {
    671    'name':
    672        'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=floor',
    673    'graph': {
    674      'inputs': {
    675        'averagePool2dInput': {
    676          'data': [
    677            22.975555419921875, 91.59549713134766,  78.15438079833984,
    678            65.64701080322266,  9.686111450195312,  55.14215087890625,
    679            51.298038482666016, 18.432437896728516, 32.193084716796875,
    680            49.34624099731445,  87.65037536621094,  15.648024559020996,
    681            87.25082397460938,  68.02723693847656,  39.49794006347656,
    682            20.342548370361328, 80.0996322631836,   26.727949142456055,
    683            10.220142364501953, 64.87446594238281,  52.602699279785156,
    684            46.5671501159668,   1.4128639698028564, 79.57833099365234,
    685            11.95406436920166,  4.33846378326416,   85.00074768066406,
    686            38.183837890625,    64.78374481201172,  45.25398254394531,
    687            88.03128814697266,  80.9718017578125,   11.333850860595703,
    688            67.58124542236328,  70.61659240722656,  6.0264997482299805,
    689            84.90442657470703,  29.7788143157959,   79.06687927246094,
    690            58.58993148803711,  7.3287248611450195, 2.2384984493255615,
    691            35.97796630859375,  14.50549030303955,  10.177306175231934,
    692            68.72449493408203,  1.4140757322311401, 76.45657348632812,
    693            78.10037994384766,  23.53263282775879
    694          ],
    695          'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
    696        }
    697      },
    698      'operators': [{
    699        'name': 'averagePool2d',
    700        'arguments': [
    701          {'input': 'averagePool2dInput'}, {
    702            'options': {
    703              'windowDimensions': [3, 3],
    704              'padding': [1, 0, 0, 1],
    705              'strides': [2, 2],
    706              'layout': 'nhwc',
    707              'roundingType': 'floor'
    708            }
    709          }
    710        ],
    711        'outputs': 'averagePool2dOutput'
    712      }],
    713      'expectedOutputs': {
    714        'averagePool2dOutput': {
    715          'data': [
    716            54.20252990722656, 52.73374557495117, 37.16582489013672,
    717            39.1442985534668, 50.038944244384766, 43.23125457763672,
    718            58.46046447753906, 32.67961120605469
    719          ],
    720          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
    721        }
    722      }
    723    }
    724  },
    725  {
    726    'name':
    727        'averagePool2d float32 4D tensor options.layout=nhwc and options.roundingType=ceil',
    728    'graph': {
    729      'inputs': {
    730        'averagePool2dInput': {
    731          'data': [
    732            22.975555419921875, 91.59549713134766,  78.15438079833984,
    733            65.64701080322266,  9.686111450195312,  55.14215087890625,
    734            51.298038482666016, 18.432437896728516, 32.193084716796875,
    735            49.34624099731445,  87.65037536621094,  15.648024559020996,
    736            87.25082397460938,  68.02723693847656,  39.49794006347656,
    737            20.342548370361328, 80.0996322631836,   26.727949142456055,
    738            10.220142364501953, 64.87446594238281,  52.602699279785156,
    739            46.5671501159668,   1.4128639698028564, 79.57833099365234,
    740            11.95406436920166,  4.33846378326416,   85.00074768066406,
    741            38.183837890625,    64.78374481201172,  45.25398254394531,
    742            88.03128814697266,  80.9718017578125,   11.333850860595703,
    743            67.58124542236328,  70.61659240722656,  6.0264997482299805,
    744            84.90442657470703,  29.7788143157959,   79.06687927246094,
    745            58.58993148803711,  7.3287248611450195, 2.2384984493255615,
    746            35.97796630859375,  14.50549030303955,  10.177306175231934,
    747            68.72449493408203,  1.4140757322311401, 76.45657348632812,
    748            78.10037994384766,  23.53263282775879
    749          ],
    750          'descriptor': {shape: [1, 5, 5, 2], dataType: 'float32'}
    751        }
    752      },
    753      'operators': [{
    754        'name': 'averagePool2d',
    755        'arguments': [
    756          {'input': 'averagePool2dInput'}, {
    757            'options': {
    758              'windowDimensions': [3, 3],
    759              'padding': [1, 0, 0, 1],
    760              'strides': [2, 2],
    761              'layout': 'nhwc',
    762              'roundingType': 'ceil'
    763            }
    764          }
    765        ],
    766        'outputs': 'averagePool2dOutput'
    767      }],
    768      'expectedOutputs': {
    769        'averagePool2dOutput': {
    770          'data': [
    771            54.20252990722656, 52.73374557495117, 37.16582489013672,
    772            39.1442985534668, 21.206613540649414, 57.1103515625,
    773            50.038944244384766, 43.23125457763672, 58.46046447753906,
    774            32.67961120605469, 51.3569221496582, 56.23945999145508,
    775            37.24428939819336, 40.00800323486328, 54.04661178588867,
    776            43.85149002075195, 78.58363342285156, 41.061283111572266
    777          ],
    778          'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
    779        }
    780      }
    781    }
    782  },
    783  {
    784    'name':
    785        'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=floor',
    786    'graph': {
    787      'inputs': {
    788        'averagePool2dInput': {
    789          'data': [
    790            22.975555419921875, 78.15438079833984,  9.686111450195312,
    791            51.298038482666016, 32.193084716796875, 87.65037536621094,
    792            87.25082397460938,  39.49794006347656,  80.0996322631836,
    793            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    794            11.95406436920166,  85.00074768066406,  64.78374481201172,
    795            88.03128814697266,  11.333850860595703, 70.61659240722656,
    796            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    797            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    798            78.10037994384766,  91.59549713134766,  65.64701080322266,
    799            55.14215087890625,  18.432437896728516, 49.34624099731445,
    800            15.648024559020996, 68.02723693847656,  20.342548370361328,
    801            26.727949142456055, 64.87446594238281,  46.5671501159668,
    802            79.57833099365234,  4.33846378326416,   38.183837890625,
    803            45.25398254394531,  80.9718017578125,   67.58124542236328,
    804            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    805            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    806            76.45657348632812,  23.53263282775879
    807          ],
    808          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    809        }
    810      },
    811      'operators': [{
    812        'name': 'averagePool2d',
    813        'arguments': [
    814          {'input': 'averagePool2dInput'}, {
    815            'options': {
    816              'windowDimensions': [3, 3],
    817              'padding': [1, 0, 0, 1],
    818              'strides': [2, 2],
    819              'roundingType': 'floor',
    820              'outputSizes': [3, 3]
    821            }
    822          }
    823        ],
    824        'outputs': 'averagePool2dOutput'
    825      }],
    826      'expectedOutputs': {
    827        'averagePool2dOutput': {
    828          'data': [
    829            54.20252990722656, 37.16582489013672, 21.206613540649414,
    830            50.038944244384766, 58.46046447753906, 51.3569221496582,
    831            37.24428939819336, 54.04661178588867, 78.58363342285156,
    832            52.73374557495117, 39.1442985534668, 57.1103515625,
    833            43.23125457763672, 32.67961120605469, 56.23945999145508,
    834            40.00800323486328, 43.85149002075195, 41.061283111572266
    835          ],
    836          'descriptor': {shape: [1, 2, 3, 3], dataType: 'float32'}
    837        }
    838      }
    839    }
    840  },
    841  {
    842    'name':
    843        'averagePool2d float32 4D tensor options.outputSizes ignores options.roundingType=ceil',
    844    'graph': {
    845      'inputs': {
    846        'averagePool2dInput': {
    847          'data': [
    848            22.975555419921875, 78.15438079833984,  9.686111450195312,
    849            51.298038482666016, 32.193084716796875, 87.65037536621094,
    850            87.25082397460938,  39.49794006347656,  80.0996322631836,
    851            10.220142364501953, 52.602699279785156, 1.4128639698028564,
    852            11.95406436920166,  85.00074768066406,  64.78374481201172,
    853            88.03128814697266,  11.333850860595703, 70.61659240722656,
    854            84.90442657470703,  79.06687927246094,  7.3287248611450195,
    855            35.97796630859375,  10.177306175231934, 1.4140757322311401,
    856            78.10037994384766,  91.59549713134766,  65.64701080322266,
    857            55.14215087890625,  18.432437896728516, 49.34624099731445,
    858            15.648024559020996, 68.02723693847656,  20.342548370361328,
    859            26.727949142456055, 64.87446594238281,  46.5671501159668,
    860            79.57833099365234,  4.33846378326416,   38.183837890625,
    861            45.25398254394531,  80.9718017578125,   67.58124542236328,
    862            6.0264997482299805, 29.7788143157959,   58.58993148803711,
    863            2.2384984493255615, 14.50549030303955,  68.72449493408203,
    864            76.45657348632812,  23.53263282775879
    865          ],
    866          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float32'}
    867        }
    868      },
    869      'operators': [{
    870        'name': 'averagePool2d',
    871        'arguments': [
    872          {'input': 'averagePool2dInput'}, {
    873            'options': {
    874              'windowDimensions': [3, 3],
    875              'padding': [1, 0, 0, 1],
    876              'strides': [2, 2],
    877              'roundingType': 'ceil',
    878              'outputSizes': [2, 2]
    879            }
    880          }
    881        ],
    882        'outputs': 'averagePool2dOutput'
    883      }],
    884      'expectedOutputs': {
    885        'averagePool2dOutput': {
    886          'data': [
    887            54.20252990722656, 37.16582489013672, 50.038944244384766,
    888            58.46046447753906, 52.73374557495117, 39.1442985534668,
    889            43.23125457763672, 32.67961120605469
    890          ],
    891          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float32'}
    892        }
    893      }
    894    }
    895  },
    896  {
    897    'name':
    898        'averagePool2d float32 4D tensor options.dilations with options.strides',
    899    'graph': {
    900      'inputs': {
    901        'averagePool2dInput': {
    902          'data': [
    903            70.71148681640625,  99.33489990234375,  76.41767883300781,
    904            39.40980911254883,  38.16328811645508,  45.971256256103516,
    905            65.3527603149414,   64.51607513427734,  7.725966930389404,
    906            41.7672004699707,   94.92633819580078,  53.475772857666016,
    907            95.46460723876953,  58.461795806884766, 15.831390380859375,
    908            78.41020202636719,  24.454092025756836, 20.630916595458984,
    909            32.06352233886719,  47.85192108154297,  91.60813903808594,
    910            72.3534927368164,   74.69429779052734,  28.860214233398438,
    911            71.82395935058594,  7.989691734313965,  88.16659545898438,
    912            58.69850540161133,  63.6061897277832,   55.88187789916992,
    913            52.809974670410156, 72.91474151611328,  46.957664489746094,
    914            22.10279655456543,  87.14309692382812,  89.6496810913086,
    915            63.19610595703125,  11.760882377624512, 70.68730926513672,
    916            57.70444107055664,  1.183821439743042,  25.26912498474121,
    917            95.29122924804688,  1.9658530950546265, 53.368465423583984,
    918            21.400854110717773, 55.86185836791992,  27.824508666992188,
    919            7.642839431762695,  82.34233093261719,  91.75215911865234,
    920            62.79155731201172,  28.11526107788086,  28.72478675842285,
    921            29.887035369873047, 66.4310302734375,   7.0103044509887695,
    922            34.33702087402344,  73.20159912109375,  7.8835601806640625,
    923            17.82563591003418,  33.799156188964844, 65.01251220703125,
    924            30.264028549194336, 75.76551818847656,  21.150800704956055,
    925            60.84249496459961,  98.56522369384766,  62.60990905761719,
    926            42.42991256713867,  53.142147064208984, 36.29545974731445,
    927            79.95863342285156,  79.60734558105469,  16.059114456176758,
    928            19.27552032470703,  53.93022918701172,  48.41620635986328,
    929            93.00965118408203,  62.086524963378906, 83.50532531738281,
    930            61.07964324951172,  75.51439666748047,  54.193782806396484,
    931            2.572873830795288,  59.47652053833008,  34.22541427612305,
    932            13.07015323638916,  12.419061660766602, 55.82337188720703,
    933            4.553813934326172,  63.47830581665039,  62.3555908203125,
    934            56.961090087890625, 34.77016067504883,  0.9611223936080933,
    935            35.30686950683594,  98.00790405273438
    936          ],
    937          'descriptor': {shape: [1, 7, 7, 2], dataType: 'float32'}
    938        }
    939      },
    940      'operators': [{
    941        'name': 'averagePool2d',
    942        'arguments': [
    943          {'input': 'averagePool2dInput'}, {
    944            'options': {
    945              'windowDimensions': [3, 3],
    946              'padding': [1, 0, 0, 1],
    947              'strides': [2, 2],
    948              'layout': 'nhwc'
    949            }
    950          }
    951        ],
    952        'outputs': 'averagePool2dOutput'
    953      }],
    954      'expectedOutputs': {
    955        'averagePool2dOutput': {
    956          'data': [
    957            42.940242767333984, 55.268165588378906, 51.6013298034668,
    958            50.220027923583984, 72.13362884521484, 41.542198181152344,
    959            48.91604232788086, 38.775962829589844, 61.21329879760742,
    960            49.504154205322266, 57.72294998168945, 38.6922492980957,
    961            50.19099807739258, 29.15436363220215, 52.98439025878906,
    962            43.10562515258789, 66.77796936035156, 55.2725830078125
    963          ],
    964          'descriptor': {shape: [1, 3, 3, 2], dataType: 'float32'}
    965        }
    966      }
    967    }
    968  },
    969 
    970  // float16 tests
    971  {
    972    'name':
    973        'averagePool2d float16 4D constant tensor all positive default options',
    974    'graph': {
    975      'inputs': {
    976        'averagePool2dInput': {
    977          'data': [
    978            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
    979            87.625,     87.25,        39.5,       80.125,    10.21875,
    980            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
    981            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
    982            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
    983            91.625,     65.625,       55.15625,   18.4375,   49.34375,
    984            15.6484375, 68,           20.34375,   26.734375, 64.875,
    985            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
    986            81,         67.5625,      6.02734375, 29.78125,  58.59375,
    987            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
    988          ],
    989          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'},
    990          'constant': true
    991        }
    992      },
    993      'operators': [{
    994        'name': 'averagePool2d',
    995        'arguments': [{'input': 'averagePool2dInput'}],
    996        'outputs': 'averagePool2dOutput'
    997      }],
    998      'expectedOutputs': {
    999        'averagePool2dOutput': {
   1000          'data': [47.28125, 44.71875],
   1001          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
   1002        }
   1003      }
   1004    }
   1005  },
   1006  {
   1007    'name': 'averagePool2d float16 4D tensor all positive default options',
   1008    'graph': {
   1009      'inputs': {
   1010        'averagePool2dInput': {
   1011          'data': [
   1012            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1013            87.625,     87.25,        39.5,       80.125,    10.21875,
   1014            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1015            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1016            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1017            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1018            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1019            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1020            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1021            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1022          ],
   1023          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1024        }
   1025      },
   1026      'operators': [{
   1027        'name': 'averagePool2d',
   1028        'arguments': [{'input': 'averagePool2dInput'}],
   1029        'outputs': 'averagePool2dOutput'
   1030      }],
   1031      'expectedOutputs': {
   1032        'averagePool2dOutput': {
   1033          'data': [47.28125, 44.71875],
   1034          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
   1035        }
   1036      }
   1037    }
   1038  },
   1039  {
   1040    'name': 'averagePool2d float16 4D tensor all negative default options',
   1041    'graph': {
   1042      'inputs': {
   1043        'averagePool2dInput': {
   1044          'data': [
   1045            -83.875,   -2.07421875, -7.5625,   -45.28125,     -16.359375,
   1046            -44.90625, -42.03125,   -44.78125, -1.5068359375, -52.65625,
   1047            -92,       -48,         -61.53125, -93.4375,      -25.78125,
   1048            -95.5,     -10.9609375, -59.125,   -32.59375,     -21.453125,
   1049            -87.125,   -61.3125,    -42,       -87.875,       -71.6875,
   1050            -80.25,    -97.5,       -75.875,   -45.09375,     -88.25,
   1051            -90.6875,  -93.3125,    -59.15625, -45.34375,     -51.3125,
   1052            -31.15625, -31.625,     -62.8125,  -63.5625,      -68.9375,
   1053            -43.09375, -15.8046875, -64.3125,  -66.4375,      -42.03125,
   1054            -26.03125, -22.734375,  -70.3125,  -85.3125,      -92.125
   1055          ],
   1056          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1057        }
   1058      },
   1059      'operators': [{
   1060        'name': 'averagePool2d',
   1061        'arguments': [{'input': 'averagePool2dInput'}],
   1062        'outputs': 'averagePool2dOutput'
   1063      }],
   1064      'expectedOutputs': {
   1065        'averagePool2dOutput': {
   1066          'data': [-49.25, -60.53125],
   1067          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
   1068        }
   1069      }
   1070    }
   1071  },
   1072  {
   1073    'name': 'averagePool2d float16 4D tensor options.windowDimensions',
   1074    'graph': {
   1075      'inputs': {
   1076        'averagePool2dInput': {
   1077          'data': [
   1078            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1079            87.625,     87.25,        39.5,       80.125,    10.21875,
   1080            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1081            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1082            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1083            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1084            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1085            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1086            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1087            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1088          ],
   1089          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1090        }
   1091      },
   1092      'operators': [{
   1093        'name': 'averagePool2d',
   1094        'arguments': [
   1095          {'input': 'averagePool2dInput'},
   1096          {'options': {'windowDimensions': [3, 3]}}
   1097        ],
   1098        'outputs': 'averagePool2dOutput'
   1099      }],
   1100      'expectedOutputs': {
   1101        'averagePool2dOutput': {
   1102          'data': [
   1103            43.46875, 49.375, 42.75, 50.03125, 52.4375, 58.46875, 32.15625,
   1104            34.75, 54, 49.65625, 41.8125, 35.84375, 43.21875, 37.84375, 32.6875,
   1105            41.1875, 42.78125, 39
   1106          ],
   1107          'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
   1108        }
   1109      }
   1110    }
   1111  },
   1112  {
   1113    'name':
   1114        'global averagePool2d float16 4D tensor all positive options.windowDimensions',
   1115    'graph': {
   1116      'inputs': {
   1117        'averagePool2dInput': {
   1118          'data': [
   1119            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1120            87.625,     87.25,        39.5,       80.125,    10.21875,
   1121            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1122            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1123            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1124            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1125            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1126            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1127            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1128            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1129          ],
   1130          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1131        }
   1132      },
   1133      'operators': [{
   1134        'name': 'averagePool2d',
   1135        'arguments': [
   1136          {'input': 'averagePool2dInput'},
   1137          {'options': {'windowDimensions': [5, 5]}}
   1138        ],
   1139        'outputs': 'averagePool2dOutput'
   1140      }],
   1141      'expectedOutputs': {
   1142        'averagePool2dOutput': {
   1143          'data': [47.28125, 44.71875],
   1144          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
   1145        }
   1146      }
   1147    }
   1148  },
   1149  {
   1150    'name': 'averagePool2d float16 4D tensor options.padding',
   1151    'graph': {
   1152      'inputs': {
   1153        'averagePool2dInput': {
   1154          'data': [
   1155            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1156            87.625,     87.25,        39.5,       80.125,    10.21875,
   1157            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1158            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1159            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1160            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1161            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1162            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1163            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1164            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1165          ],
   1166          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1167        }
   1168      },
   1169      'operators': [{
   1170        'name': 'averagePool2d',
   1171        'arguments': [
   1172          {'input': 'averagePool2dInput'},
   1173          {'options': {'padding': [1, 0, 0, 1]}}
   1174        ],
   1175        'outputs': 'averagePool2dOutput'
   1176      }],
   1177      'expectedOutputs': {
   1178        'averagePool2dOutput': {
   1179          'data': [
   1180            52.4375, 49.84375, 47.28125, 46.15625, 46.625, 43.625, 44.71875,
   1181            44.0625
   1182          ],
   1183          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
   1184        }
   1185      }
   1186    }
   1187  },
   1188  {
   1189    'name': 'averagePool2d float16 4D tensor options.strides',
   1190    'graph': {
   1191      'inputs': {
   1192        'averagePool2dInput': {
   1193          'data': [
   1194            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1195            87.625,     87.25,        39.5,       80.125,    10.21875,
   1196            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1197            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1198            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1199            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1200            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1201            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1202            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1203            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1204          ],
   1205          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1206        }
   1207      },
   1208      'operators': [{
   1209        'name': 'averagePool2d',
   1210        'arguments': [
   1211          {'input': 'averagePool2dInput'},
   1212          {'options': {'windowDimensions': [3, 3], 'strides': [2, 2]}}
   1213        ],
   1214        'outputs': 'averagePool2dOutput'
   1215      }],
   1216      'expectedOutputs': {
   1217        'averagePool2dOutput': {
   1218          'data':
   1219              [43.46875, 42.75, 32.15625, 54, 49.65625, 35.84375, 41.1875, 39],
   1220          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
   1221        }
   1222      }
   1223    }
   1224  },
   1225  {
   1226    'name': 'averagePool2d float16 4D tensor options.dilations',
   1227    'graph': {
   1228      'inputs': {
   1229        'averagePool2dInput': {
   1230          'data': [
   1231            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1232            87.625,     87.25,        39.5,       80.125,    10.21875,
   1233            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1234            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1235            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1236            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1237            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1238            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1239            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1240            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1241          ],
   1242          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1243        }
   1244      },
   1245      'operators': [{
   1246        'name': 'averagePool2d',
   1247        'arguments': [
   1248          {'input': 'averagePool2dInput'},
   1249          {'options': {'windowDimensions': [3, 3], 'dilations': [2, 2]}}
   1250        ],
   1251        'outputs': 'averagePool2dOutput'
   1252      }],
   1253      'expectedOutputs': {
   1254        'averagePool2dOutput': {
   1255          'data': [32.21875, 42.96875],
   1256          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
   1257        }
   1258      }
   1259    }
   1260  },
   1261  {
   1262    'name': 'averagePool2d float16 4D tensor options.layout=nchw',
   1263    'graph': {
   1264      'inputs': {
   1265        'averagePool2dInput': {
   1266          'data': [
   1267            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1268            87.625,     87.25,        39.5,       80.125,    10.21875,
   1269            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1270            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1271            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1272            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1273            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1274            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1275            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1276            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1277          ],
   1278          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1279        }
   1280      },
   1281      'operators': [{
   1282        'name': 'averagePool2d',
   1283        'arguments':
   1284            [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nchw'}}],
   1285        'outputs': 'averagePool2dOutput'
   1286      }],
   1287      'expectedOutputs': {
   1288        'averagePool2dOutput': {
   1289          'data': [47.28125, 44.71875],
   1290          'descriptor': {shape: [1, 2, 1, 1], dataType: 'float16'}
   1291        }
   1292      }
   1293    }
   1294  },
   1295  {
   1296    'name': 'averagePool2d float16 4D tensor options.layout=nhwc',
   1297    'graph': {
   1298      'inputs': {
   1299        'averagePool2dInput': {
   1300          'data': [
   1301            22.96875,   91.625,     78.125,       65.625,     9.6875,
   1302            55.15625,   51.3125,    18.4375,      32.1875,    49.34375,
   1303            87.625,     15.6484375, 87.25,        68,         39.5,
   1304            20.34375,   80.125,     26.734375,    10.21875,   64.875,
   1305            52.59375,   46.5625,    1.4130859375, 79.5625,    11.953125,
   1306            4.33984375, 85,         38.1875,      64.8125,    45.25,
   1307            88.0625,    81,         11.3359375,   67.5625,    70.625,
   1308            6.02734375, 84.875,     29.78125,     79.0625,    58.59375,
   1309            7.328125,   2.23828125, 35.96875,     14.5078125, 10.1796875,
   1310            68.75,      1.4140625,  76.4375,      78.125,     23.53125
   1311          ],
   1312          'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
   1313        }
   1314      },
   1315      'operators': [{
   1316        'name': 'averagePool2d',
   1317        'arguments':
   1318            [{'input': 'averagePool2dInput'}, {'options': {'layout': 'nhwc'}}],
   1319        'outputs': 'averagePool2dOutput'
   1320      }],
   1321      'expectedOutputs': {
   1322        'averagePool2dOutput': {
   1323          'data': [47.28125, 44.71875],
   1324          'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'}
   1325        }
   1326      }
   1327    }
   1328  },
   1329  {
   1330    'name':
   1331        'global averagePool2d float16 4D tensor options.layout=nhwc and options.windowDimensions',
   1332    'graph': {
   1333      'inputs': {
   1334        'averagePool2dInput': {
   1335          'data': [
   1336            22.96875,   91.625,     78.125,       65.625,     9.6875,
   1337            55.15625,   51.3125,    18.4375,      32.1875,    49.34375,
   1338            87.625,     15.6484375, 87.25,        68,         39.5,
   1339            20.34375,   80.125,     26.734375,    10.21875,   64.875,
   1340            52.59375,   46.5625,    1.4130859375, 79.5625,    11.953125,
   1341            4.33984375, 85,         38.1875,      64.8125,    45.25,
   1342            88.0625,    81,         11.3359375,   67.5625,    70.625,
   1343            6.02734375, 84.875,     29.78125,     79.0625,    58.59375,
   1344            7.328125,   2.23828125, 35.96875,     14.5078125, 10.1796875,
   1345            68.75,      1.4140625,  76.4375,      78.125,     23.53125
   1346          ],
   1347          'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
   1348        }
   1349      },
   1350      'operators': [{
   1351        'name': 'averagePool2d',
   1352        'arguments': [
   1353          {'input': 'averagePool2dInput'},
   1354          {'options': {'windowDimensions': [5, 5], 'layout': 'nhwc'}}
   1355        ],
   1356        'outputs': 'averagePool2dOutput'
   1357      }],
   1358      'expectedOutputs': {
   1359        'averagePool2dOutput': {
   1360          'data': [47.28125, 44.71875],
   1361          'descriptor': {shape: [1, 1, 1, 2], dataType: 'float16'}
   1362        }
   1363      }
   1364    }
   1365  },
   1366  {
   1367    'name': 'averagePool2d float16 4D tensor options.roundingType=floor',
   1368    'graph': {
   1369      'inputs': {
   1370        'averagePool2dInput': {
   1371          'data': [
   1372            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1373            87.625,     87.25,        39.5,       80.125,    10.21875,
   1374            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1375            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1376            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1377            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1378            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1379            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1380            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1381            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1382          ],
   1383          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1384        }
   1385      },
   1386      'operators': [{
   1387        'name': 'averagePool2d',
   1388        'arguments': [
   1389          {'input': 'averagePool2dInput'}, {
   1390            'options': {
   1391              'windowDimensions': [3, 3],
   1392              'padding': [1, 0, 0, 1],
   1393              'strides': [2, 2],
   1394              'roundingType': 'floor'
   1395            }
   1396          }
   1397        ],
   1398        'outputs': 'averagePool2dOutput'
   1399      }],
   1400      'expectedOutputs': {
   1401        'averagePool2dOutput': {
   1402          'data': [
   1403            54.1875, 37.1875, 50.03125, 58.46875, 52.71875, 39.15625, 43.21875,
   1404            32.6875
   1405          ],
   1406          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
   1407        }
   1408      }
   1409    }
   1410  },
   1411  {
   1412    'name': 'averagePool2d float16 4D tensor options.roundingType=ceil',
   1413    'graph': {
   1414      'inputs': {
   1415        'averagePool2dInput': {
   1416          'data': [
   1417            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1418            87.625,     87.25,        39.5,       80.125,    10.21875,
   1419            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1420            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1421            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1422            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1423            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1424            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1425            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1426            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1427          ],
   1428          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1429        }
   1430      },
   1431      'operators': [{
   1432        'name': 'averagePool2d',
   1433        'arguments': [
   1434          {'input': 'averagePool2dInput'}, {
   1435            'options': {
   1436              'windowDimensions': [3, 3],
   1437              'padding': [1, 0, 0, 1],
   1438              'strides': [2, 2],
   1439              'roundingType': 'ceil'
   1440            }
   1441          }
   1442        ],
   1443        'outputs': 'averagePool2dOutput'
   1444      }],
   1445      'expectedOutputs': {
   1446        'averagePool2dOutput': {
   1447          'data': [
   1448            54.1875, 37.1875, 21.203125, 50.03125, 58.46875, 51.375, 37.25,
   1449            54.0625, 78.625, 52.71875, 39.15625, 57.125, 43.21875, 32.6875,
   1450            56.25, 40, 43.84375, 41.0625
   1451          ],
   1452          'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
   1453        }
   1454      }
   1455    }
   1456  },
   1457  {
   1458    'name':
   1459        'averagePool2d float16 4D tensor options.roundingType=ceil and no padding',
   1460    'graph': {
   1461      'inputs': {
   1462        'averagePool2dInput': {
   1463          'data': [
   1464            22.96875,   78.125,  9.6875,   51.3125,  32.1875,    87.625,
   1465            87.25,      39.5,    80.125,   10.21875, 52.59375,   1.4130859375,
   1466            11.953125,  85,      64.8125,  88.0625,  11.3359375, 70.625,
   1467            84.875,     79.0625, 7.328125, 35.96875, 10.1796875, 1.4140625,
   1468            78.125,     91.625,  65.625,   55.15625, 18.4375,    49.34375,
   1469            15.6484375, 68
   1470          ],
   1471          'descriptor': {shape: [1, 2, 4, 4], dataType: 'float16'}
   1472        }
   1473      },
   1474      'operators': [{
   1475        'name': 'averagePool2d',
   1476        'arguments': [
   1477          {'input': 'averagePool2dInput'}, {
   1478            'options': {
   1479              'windowDimensions': [3, 3],
   1480              'strides': [2, 2],
   1481              'roundingType': 'ceil'
   1482            }
   1483          }
   1484        ],
   1485        'outputs': 'averagePool2dOutput'
   1486      }],
   1487      'expectedOutputs': {
   1488        'averagePool2dOutput': {
   1489          'data': [
   1490            51.1875, 40.28125, 50.78125, 51.71875, 50.625, 49.375, 53.125,
   1491            51.09375
   1492          ],
   1493          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
   1494        }
   1495      }
   1496    }
   1497  },
   1498  {
   1499    'name':
   1500        'averagePool2d float16 4D tensor options.layout=nhwc and options.roundingType=floor',
   1501    'graph': {
   1502      'inputs': {
   1503        'averagePool2dInput': {
   1504          'data': [
   1505            22.96875,   91.625,     78.125,       65.625,     9.6875,
   1506            55.15625,   51.3125,    18.4375,      32.1875,    49.34375,
   1507            87.625,     15.6484375, 87.25,        68,         39.5,
   1508            20.34375,   80.125,     26.734375,    10.21875,   64.875,
   1509            52.59375,   46.5625,    1.4130859375, 79.5625,    11.953125,
   1510            4.33984375, 85,         38.1875,      64.8125,    45.25,
   1511            88.0625,    81,         11.3359375,   67.5625,    70.625,
   1512            6.02734375, 84.875,     29.78125,     79.0625,    58.59375,
   1513            7.328125,   2.23828125, 35.96875,     14.5078125, 10.1796875,
   1514            68.75,      1.4140625,  76.4375,      78.125,     23.53125
   1515          ],
   1516          'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
   1517        }
   1518      },
   1519      'operators': [{
   1520        'name': 'averagePool2d',
   1521        'arguments': [
   1522          {'input': 'averagePool2dInput'}, {
   1523            'options': {
   1524              'windowDimensions': [3, 3],
   1525              'padding': [1, 0, 0, 1],
   1526              'strides': [2, 2],
   1527              'layout': 'nhwc',
   1528              'roundingType': 'floor'
   1529            }
   1530          }
   1531        ],
   1532        'outputs': 'averagePool2dOutput'
   1533      }],
   1534      'expectedOutputs': {
   1535        'averagePool2dOutput': {
   1536          'data': [
   1537            54.1875, 52.71875, 37.1875, 39.15625, 50.03125, 43.21875, 58.46875,
   1538            32.6875
   1539          ],
   1540          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
   1541        }
   1542      }
   1543    }
   1544  },
   1545  {
   1546    'name':
   1547        'averagePool2d float16 4D tensor options.layout=nhwc and options.roundingType=ceil',
   1548    'graph': {
   1549      'inputs': {
   1550        'averagePool2dInput': {
   1551          'data': [
   1552            22.96875,   91.625,     78.125,       65.625,     9.6875,
   1553            55.15625,   51.3125,    18.4375,      32.1875,    49.34375,
   1554            87.625,     15.6484375, 87.25,        68,         39.5,
   1555            20.34375,   80.125,     26.734375,    10.21875,   64.875,
   1556            52.59375,   46.5625,    1.4130859375, 79.5625,    11.953125,
   1557            4.33984375, 85,         38.1875,      64.8125,    45.25,
   1558            88.0625,    81,         11.3359375,   67.5625,    70.625,
   1559            6.02734375, 84.875,     29.78125,     79.0625,    58.59375,
   1560            7.328125,   2.23828125, 35.96875,     14.5078125, 10.1796875,
   1561            68.75,      1.4140625,  76.4375,      78.125,     23.53125
   1562          ],
   1563          'descriptor': {shape: [1, 5, 5, 2], dataType: 'float16'}
   1564        }
   1565      },
   1566      'operators': [{
   1567        'name': 'averagePool2d',
   1568        'arguments': [
   1569          {'input': 'averagePool2dInput'}, {
   1570            'options': {
   1571              'windowDimensions': [3, 3],
   1572              'padding': [1, 0, 0, 1],
   1573              'strides': [2, 2],
   1574              'layout': 'nhwc',
   1575              'roundingType': 'ceil'
   1576            }
   1577          }
   1578        ],
   1579        'outputs': 'averagePool2dOutput'
   1580      }],
   1581      'expectedOutputs': {
   1582        'averagePool2dOutput': {
   1583          'data': [
   1584            54.1875, 52.71875, 37.1875, 39.15625, 21.203125, 57.125, 50.03125,
   1585            43.21875, 58.46875, 32.6875, 51.375, 56.25, 37.25, 40, 54.0625,
   1586            43.84375, 78.625, 41.0625
   1587          ],
   1588          'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'}
   1589        }
   1590      }
   1591    }
   1592  },
   1593  {
   1594    'name':
   1595        'averagePool2d float16 4D tensor options.outputSizes ignores options.roundingType=floor',
   1596    'graph': {
   1597      'inputs': {
   1598        'averagePool2dInput': {
   1599          'data': [
   1600            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1601            87.625,     87.25,        39.5,       80.125,    10.21875,
   1602            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1603            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1604            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1605            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1606            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1607            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1608            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1609            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1610          ],
   1611          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1612        }
   1613      },
   1614      'operators': [{
   1615        'name': 'averagePool2d',
   1616        'arguments': [
   1617          {'input': 'averagePool2dInput'}, {
   1618            'options': {
   1619              'windowDimensions': [3, 3],
   1620              'padding': [1, 0, 0, 1],
   1621              'strides': [2, 2],
   1622              'roundingType': 'floor',
   1623              'outputSizes': [3, 3]
   1624            }
   1625          }
   1626        ],
   1627        'outputs': 'averagePool2dOutput'
   1628      }],
   1629      'expectedOutputs': {
   1630        'averagePool2dOutput': {
   1631          'data': [
   1632            54.1875, 37.1875, 21.203125, 50.03125, 58.46875, 51.375, 37.25,
   1633            54.0625, 78.625, 52.71875, 39.15625, 57.125, 43.21875, 32.6875,
   1634            56.25, 40, 43.84375, 41.0625
   1635          ],
   1636          'descriptor': {shape: [1, 2, 3, 3], dataType: 'float16'}
   1637        }
   1638      }
   1639    }
   1640  },
   1641  {
   1642    'name':
   1643        'averagePool2d float16 4D tensor options.outputSizes ignores options.roundingType=ceil',
   1644    'graph': {
   1645      'inputs': {
   1646        'averagePool2dInput': {
   1647          'data': [
   1648            22.96875,   78.125,       9.6875,     51.3125,   32.1875,
   1649            87.625,     87.25,        39.5,       80.125,    10.21875,
   1650            52.59375,   1.4130859375, 11.953125,  85,        64.8125,
   1651            88.0625,    11.3359375,   70.625,     84.875,    79.0625,
   1652            7.328125,   35.96875,     10.1796875, 1.4140625, 78.125,
   1653            91.625,     65.625,       55.15625,   18.4375,   49.34375,
   1654            15.6484375, 68,           20.34375,   26.734375, 64.875,
   1655            46.5625,    79.5625,      4.33984375, 38.1875,   45.25,
   1656            81,         67.5625,      6.02734375, 29.78125,  58.59375,
   1657            2.23828125, 14.5078125,   68.75,      76.4375,   23.53125
   1658          ],
   1659          'descriptor': {shape: [1, 2, 5, 5], dataType: 'float16'}
   1660        }
   1661      },
   1662      'operators': [{
   1663        'name': 'averagePool2d',
   1664        'arguments': [
   1665          {'input': 'averagePool2dInput'}, {
   1666            'options': {
   1667              'windowDimensions': [3, 3],
   1668              'padding': [1, 0, 0, 1],
   1669              'strides': [2, 2],
   1670              'roundingType': 'ceil',
   1671              'outputSizes': [2, 2]
   1672            }
   1673          }
   1674        ],
   1675        'outputs': 'averagePool2dOutput'
   1676      }],
   1677      'expectedOutputs': {
   1678        'averagePool2dOutput': {
   1679          'data': [
   1680            54.1875, 37.1875, 50.03125, 58.46875, 52.71875, 39.15625, 43.21875,
   1681            32.6875
   1682          ],
   1683          'descriptor': {shape: [1, 2, 2, 2], dataType: 'float16'}
   1684        }
   1685      }
   1686    }
   1687  },
   1688  {
   1689    'name':
   1690        'averagePool2d float16 4D tensor options.dilations with options.strides',
   1691    'graph': {
   1692      'inputs': {
   1693        'averagePool2dInput': {
   1694          'data': [
   1695            70.6875,    99.3125,    76.4375,    39.40625,     38.15625,
   1696            45.96875,   65.375,     64.5,       7.7265625,    41.78125,
   1697            94.9375,    53.46875,   95.4375,    58.46875,     15.828125,
   1698            78.4375,    24.453125,  20.625,     32.0625,      47.84375,
   1699            91.625,     72.375,     74.6875,    28.859375,    71.8125,
   1700            7.98828125, 88.1875,    58.6875,    63.59375,     55.875,
   1701            52.8125,    72.9375,    46.96875,   22.109375,    87.125,
   1702            89.625,     63.1875,    11.7578125, 70.6875,      57.71875,
   1703            1.18359375, 25.265625,  95.3125,    1.9658203125, 53.375,
   1704            21.40625,   55.875,     27.828125,  7.64453125,   82.3125,
   1705            91.75,      62.78125,   28.109375,  28.71875,     29.890625,
   1706            66.4375,    7.01171875, 34.34375,   73.1875,      7.8828125,
   1707            17.828125,  33.8125,    65,         30.265625,    75.75,
   1708            21.15625,   60.84375,   98.5625,    62.625,       42.4375,
   1709            53.15625,   36.28125,   79.9375,    79.625,       16.0625,
   1710            19.28125,   53.9375,    48.40625,   93,           62.09375,
   1711            83.5,       61.09375,   75.5,       54.1875,      2.572265625,
   1712            59.46875,   34.21875,   13.0703125, 12.421875,    55.8125,
   1713            4.5546875,  63.46875,   62.34375,   56.96875,     34.78125,
   1714            0.9609375,  35.3125,    98
   1715          ],
   1716          'descriptor': {shape: [1, 7, 7, 2], dataType: 'float16'}
   1717        }
   1718      },
   1719      'operators': [{
   1720        'name': 'averagePool2d',
   1721        'arguments': [
   1722          {'input': 'averagePool2dInput'}, {
   1723            'options': {
   1724              'windowDimensions': [3, 3],
   1725              'padding': [1, 0, 0, 1],
   1726              'strides': [2, 2],
   1727              'layout': 'nhwc'
   1728            }
   1729          }
   1730        ],
   1731        'outputs': 'averagePool2dOutput'
   1732      }],
   1733      'expectedOutputs': {
   1734        'averagePool2dOutput': {
   1735          'data': [
   1736            42.9375, 55.25, 51.59375, 50.21875, 72.125, 41.53125, 48.90625,
   1737            38.78125, 61.21875, 49.5, 57.71875, 38.6875, 50.1875, 29.15625,
   1738            52.96875, 43.09375, 66.75, 55.28125
   1739          ],
   1740          'descriptor': {shape: [1, 3, 3, 2], dataType: 'float16'}
   1741        }
   1742      }
   1743    }
   1744  }
   1745 ];
   1746 
   1747 webnn_conformance_test(
   1748    averagePool2dTests, buildAndExecuteGraph, getPrecisionTolerance);