我正在使用EfficientNet
,我希望从我的代码中删除TensorFlow依赖项,为此,我想自己创建preprocess_input
。
from tensorflow.keras.applications.efficientnet import preprocess_input
有人能告诉我如何在不使用preprocess_input
的情况下编写效率网的TensorFlow函数吗?
def preprocess_input():
......
return
到目前为止我找到了这个存储库。https://github.com/keras-team/keras-applications/blob/master/keras_applications/efficientnet.py,但我无法理解代码。
发布于 2022-11-18 01:10:04
有效的网络模型期望图像的像素在0到255之间,因此如果图像的像素位于该范围内,则不需要对输入进行预处理。
https://stackoverflow.com/questions/74472305
复制相似问题