tensorflow / tfjs-wechat

WeChat Mini-program plugin for TensorFlow.js
https://tensorflow.org/js
545 stars 101 forks source link

rangeError length out of range of buffer #96

Open WD-CHINA opened 3 years ago

WD-CHINA commented 3 years ago

const temp = tf.tensor(new Uint8Array(frame.data), [frame.height, frame.width, 4]) 在这个方法中,ios14.5以上报rangeError length out of range of buffer错误,其他的没有问题

WD-CHINA commented 3 years ago

const video = tf.tidy(() => { const temp = tf.tensor(new Uint8Array(frame.data), [frame.height, frame.width, 4]) const sliceOptions = getFrameSliceOptions(this.cameraPosition, frame.width, frame.height, this.displaySize.width, this.displaySize.height) return temp.slice(sliceOptions.start, sliceOptions.size).resizeBilinear([this.displaySize.height, this.displaySize.width]) })

WD-CHINA commented 3 years ago

temp 无法输出直接报angeError length out of range of buffer,ios14.5以上

cometwan commented 3 years ago

套层数据壳,验证可用 https://developers.weixin.qq.com/community/develop/doc/00004ac90484e072a91cec43d56800