简体   繁体   English

如何理解每种模型在keras中的`preprocess_input`函数?

[英]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.

相关问题 Keras VGG model中preprocess_input() function的作用是什么? - What is the role of preprocess_input() function in Keras VGG model? keras 中的 preprocess_input() 方法 - preprocess_input() method in keras 在 model 训练期间使用 Keras VGG19 preprocess_input function - Using Keras VGG19 preprocess_input function during model training 无法在Keras的ImageDataGenerator中将preprocess_input用作preprocessing_function - Can't use preprocess_input as preprocessing_function in ImageDataGenerator in Keras Keras:rescale=1./255 vs preprocessing_function=preprocess_input - 使用哪一个? - Keras: rescale=1./255 vs preprocessing_function=preprocess_input - which one to use? keras 的 preprocess_input 导致 ValueError: Data cardinality is ambiguous - keras' preprocess_input led to ValueError: Data cardinality is ambiguous 将 BatchDataset 与 Keras VGG16 preprocess_input 连接 - Connecting BatchDataset with Keras VGG16 preprocess_input 如何使用提供的需要 tf.Tensor 的 preprocess_input function 预处理 tf.data.Dataset? - How can I preprocess a tf.data.Dataset using a provided preprocess_input function that expects a tf.Tensor? AttributeError:“函数”对象没有属性“ preprocess_input” - AttributeError: 'function' object has no attribute 'preprocess_input' Keras Resnet50 preprocess_input 与 ImageDataGenerator 一起使用时会出现灰度图像错误 - Keras Resnet50 preprocess_input gives error with Grayscale images when used with ImageDataGenerator
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM