Skip to content

Output of MaxPooling2d not as expected on some Android devices with input tensor of certain shape. #128

Description

@109021017

TensorFlow.js version: 3.18.0
tfjs-wechat plugin version: 0.2.0
WeChat version: 8.0.18
WeChat base API version: 3.4.6
WeChat IDE version: 1.0.5

Strange output of MaxPooling2d on some Android Devices (tested on Google Pixel 3XL and Samsung Galaxy S20) only with webgl backend.

let zeroTensor= tf.zeros([1, 4, 110, 2], 'float32');
let maxPool = tfl.layers.maxPool2d({
        poolSize: [2, 2],
        strides: [2, 2]
    }); 
let tensorAfterPooling = maxPool.apply(zeroTensor) as tf.Tensor;
console.log(tf.min(tensorAfterPooling).dataSync()[0], tf.max(tensorAfterPooling).dataSync()[0])

output expected: 0 0
output: -65503.99609375 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions