Hi, Jason. I broke down my model into 4 submodels, then I tried to insert pause between models. It worked at first, I did break the 700ms UI block to several blocks like (100+200+300+200)ms.
But when I tried to make some smaller submodels, I found a conv2d layer cost more than 300ms on Snapdragon 845. Is that cost means something wrong or conv2d is a real monster?
Input shape [1, 64, 320, 240], strides [2, 2], kernel [3, 3, 64, 64]
Here’s my code and model:
        let tmpDt = Date.now();
        let allCount = 1 * 64 * 240 * 320;
        let bufferArrayF32 = new Float32Array(allCount);
        for (let i = 0; i < allCount; i++) {
            bufferArrayF32[i] = Math.random();
        }
        console.log(`tfjs: pack rand input cost ${Date.now() - tmpDt}ms`);
        let bufferTest = tf.tensor(bufferArrayF32, [1, 64, 320, 240], 'float32');

        tmpDt = Date.now();
        let result = this.model.predict(bufferTest) as Tensor;
        const modelData = await result.data();        
        console.log(`tfjs: conv2d cost ${Date.now() - tmpDt}ms`);

Model files:
https://mctest-1300121914.cos.ap-shenzhen-fsi.myqcloud.com/tf_model/model_1_test.json 1
https://mctest-1300121914.cos.ap-shenzhen-fsi.myqcloud.com/tf_model/save_model_test.bin