tfjs-wechat icon indicating copy to clipboard operation
tfjs-wechat copied to clipboard

same input, devtools works perfectly, but in device did not work

Open airqj opened this issue 4 years ago • 2 comments

To get help from the community, we encourage using Stack Overflow and the tensorflow.js tag.

TensorFlow.js version: 2.3.0 tfjs-wechat plugin version: 0.1.0 WeChat version: 7.0.18 WeChat base API version: 2.10.1 WeChat IDE version: 1.03.2006090 Describe the problem or feature request same input, in devtools work perfectly,but in android device ,the output is incorrect for example, in devtools,the output is [[[23.666297912597656,921.23193359375,183.60040283203125,927.2606201171875],[15.292533874511719,1537.2786865234375,183.01553344726562,1543.4986572265625],[0.27048492431640625,305.4588928222656,183.98831176757812,312.1147766113281],[1.2694244384765625,1384.604248046875,186.19090270996094,1390.690185546875],[5.957794189453125,1064.868408203125,182.96878051757812,1071.165771484375],[11.017524719238281,224.19439697265625,185.01129150390625,230.95016479492188],[7.940696716308594,953.9198608398438,184.24075317382812,960.0391235351562],[6.575469970703125,688.0530395507812,184.0544891357422,694.9642944335938],[12.370758056640625,138.0717010498047,185.07872009277344,143.78099060058594],[11.984046936035156,832.9068603515625,181.735107421875,838.4112548828125],[0,1473.8946533203125,184.7564697265625,1480.3912353515625],[5.432441711425781,1233.8905029296875,183.02520751953125,1240.6072998046875],[8.294059753417969,795.270263671875,183.12899780273438,801.340087890625],[4.284919738769531,986.360107421875,175.13046264648438,992.528564453125],[16.285057067871094,599.8233642578125,182.50344848632812,606.190673828125],[4.934089660644531,1154.9400634765625,184.24420166015625,1161.1971435546875],[2.3918609619140625,406.9335021972656,181.7635955810547,413.1664123535156],[0.7287826538085938,1411.01318359375,182.46786499023438,1417.558349609375],[8.268196105957031,1626.1695556640625,183.573486328125,1631.8653564453125],[5.026954650878906,1737.0159912109375,186.707763671875,1745.3245849609375],[11.749588012695312,1727.8089599609375,184.548583984375,1736.1741943359375],[39.124656677246094,1713.540771484375,181.75552368164062,1718.755615234375],[20.725425720214844,10.743600845336914,204.57266235351562,16.622875213623047],[0,1310.3511962890625,185.74510192871094,1316.6363525390625],[7.2787017822265625,507.96319580078125,183.15560913085938,513.7721557617188],[7.469696044921875,1658.9466552734375,183.41920471191406,1671.5430908203125]]]

but in android device,the output is [[[51.03124237060547,950.5,126.74998474121094,954.9999389648438],[51.03124237060547,950.5,126.74998474121094,954.9999389648438],[51.03124237060547,950.5,126.74998474121094,954.9999389648438],[51.03124237060547,950.5,126.74998474121094,954.9999389648438],[51.03124237060547,950.5,126.74998474121094,954.9999389648438],[51.03124237060547,950.5,126.74998474121094,954.9999389648438],[51.03124237060547,950.5,126.74998474121094,954.9999389648438]]]

Code to reproduce the bug / link to feature request var result = await model.executeAsync({'image_arrays:0':batched},['detections:0']); result = tf.slice(result,[0,0,1],[1,-1,4]);

airqj avatar Aug 24 '20 10:08 airqj

The output looks like all the same value, can you verify if the inputs are correct on the device?

pyu10055 avatar Sep 01 '20 01:09 pyu10055

The output looks like all the same value, can you verify if the inputs are correct on the device?

the input is a png file on remote server. when set backend to cpu, the output on devtool and device is identical. and it is correct. my model is trained custom data based on efficientdet

airqj avatar Sep 01 '20 01:09 airqj