简体   繁体   English

我们可以规范化从预训练模型中提取的特征吗

[英]Can we normalize features extracted from pre-trained models

I am working with features extracted from pre-trained VGG16 and VGG19 models.我正在处理从预训练的 VGG16 和 VGG19 模型中提取的特征。 The features have been extracted from second fully connected layer (FC2) of the above.networks.这些特征是从上述网络的第二个全连接层 (FC2) 中提取的。

The resulting feature matrix (of dimensions (8000,4096)) has values in the range [0,45].生成的特征矩阵(维度为 (8000,4096))的值在 [0,45] 范围内。 As a result, when I am using this feature matrix in gradient based optimization algorithms, the value for loss function, gradient, norms etc. take very high values.结果,当我在基于梯度的优化算法中使用此特征矩阵时,损失值 function、梯度、范数等都采用非常高的值。

In order to do away with such high values, I applied MinMax normalization to this feature matrix and since then the values are manageable.为了消除如此高的值,我对这个特征矩阵应用了 MinMax 归一化,从那时起这些值就可以管理了。 Also, the optimization algorithm is behaving properly.此外,优化算法运行正常。 Is my strategy OK ie is it fair enough to normalize features that have been extracted from a pre-trained models for further processing.我的策略是否可行,即对从预训练模型中提取的特征进行标准化以进行进一步处理是否足够公平。

From experience, as long as you are aware of the fact that your results are coming from normalized values, it is okay.根据经验,只要您知道您的结果来自标准化值这一事实,就可以了。 If normalization helps you show gradients, norms, etc. better then I am for it.如果归一化可以帮助您更好地显示梯度、范数等,那么我赞成。

What I would be cautious about though, would be any further analysis on those feature matrices as they are normalized and not the true values.不过,我要谨慎的是,对这些特征矩阵进行任何进一步分析,因为它们是标准化的,而不是真实值。 Say, if you were to study the distributions and such, you should be fine, but I am not sure what is your next step, and if this can/will be harmful.比如说,如果你要研究分布等,你应该没问题,但我不确定你的下一步是什么,以及这是否会/将有害。 Can you share more details around "further analysis"?你能分享更多关于“进一步分析”的细节吗?

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

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