[英]How to understand the `preprocess_input` function in keras for each model?
I am trying to understand how the preprocess_input
function works in keras for different models. 我正在尝试了解preprocess_input
函数如何在不同模型的keras中工作。 I looked into the source code (ie ResNet50 ) but could not make sense of the decorator @keras_modules_injection
which is defined here . 我查看了源代码(即ResNet50 ),但无法理解此处定义的装饰器@keras_modules_injection
。
How does module injection work with decorators? 模块注入如何与装饰器一起工作?
How can I directly see which preprocessings steps are performed for each model? 如何直接查看每个模型执行哪些预处理步骤?
Actually, the pre-trained models and their relevant codes were factored out a while ago into their own separate package called keras_applications
. 实际上,预先训练的模型及其相关代码是在不久前被分解到称为keras_applications
的单独软件包中的。 Therefore, you can see the pre-processing logic, specifically the preprocess_input
function here . 因此,您可以在此处看到预处理逻辑,特别是preprocess_input
函数。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.