简体   繁体   English

如何更改完全卷积 tflite model 的输入尺寸?

[英]how do I change the input dimensions for fully convolutional tflite model?

I have a tflite model file for my android application that is created with input dimensions [None,1280,720,3] for RGB input.我的 android 应用程序有一个tflite model 文件,该应用程序是使用 RGB 输入的输入尺寸[None,1280,720,3]创建的。 I would like to use the same model if I also get FHD size image inputs [ None, 1920, 1080, 3] .如果我还获得 FHD 尺寸图像输入[ None, 1920, 1080, 3]我想使用相同的 model 。

Is there a way to change the input dimensions during inference time?有没有办法在推理期间改变输入尺寸?

I would recommend training the above model with the new input dimension if you really want to get a better result in terms of accuracy by doing more computations.如果您真的想通过进行更多计算来获得更好的准确性结果,我建议您使用新的输入维度训练上述 model。 If not feasible, you can resize the given FHD-sized RGB inputs to the HD sized RGB data as a preprocessing step before invoking the model and then, you can provide the resized data to the same model.如果不可行,您可以在调用 model 之前将给定的 FHD 大小的 RGB 输入调整为 HD 大小的 RGB 数据作为预处理步骤,然后,您可以将调整大小的数据提供给相同的 model。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM