简体   繁体   English

MATLAB:我们如何改变Autoencoder的成本函数

[英]MATLAB: How can we change the cost function of Autoencoder

I want to change the cost function of Autoencoder in MATLAB instead of the traditional cost function that minimizes the reconstruction error. 我想在MATLAB中改变Autoencoder的成本函数,而不是最小化重建误差的传统成本函数。 Can I do it directly by explicitly mentioning it somewhere? 我可以直接在某个地方明确提到它吗? OR do I have to go in the code of Autoencoder. 或者我必须进入Autoencoder的代码。 Can you please suggest me the location where I may have to make changes? 你能否告诉我可能要做出改变的地方?

I'm guessing you would have to change the code itself, since there doesn't appear to be any way of changing the cost function . 我猜你必须改变代码本身,因为似乎没有任何改变成本函数的方法 Specifically, the 'LossFunction' parameter passed to trainAutoencoder appears to have 'msesparse' as the only option available. 具体来说,传递给trainAutoencoder'LossFunction'参数似乎有'msesparse'作为唯一可用的选项。

However, you can change 2 coefficients of the cost function: the 'L2WeightRegularization' coefficient and the 'SparsityRegularization' coefficient . 但是,您可以更改成本函数的2个系数: 'L2WeightRegularization'系数'SparsityRegularization'系数 The form of the L 2 Regularization and Sparsity Regularization terms appear fixed, though. 然而, L 2正则化稀疏正则化术语的形式似乎是固定的。 It's just their relative weighting that is changed in the cost function. 只是它们的相对权重在成本函数中发生了变化。

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

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