简体   繁体   中英

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. Can I do it directly by explicitly mentioning it somewhere? OR do I have to go in the code of 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.

However, you can change 2 coefficients of the cost function: the 'L2WeightRegularization' coefficient and the 'SparsityRegularization' coefficient . The form of the L 2 Regularization and Sparsity Regularization terms appear fixed, though. It's just their relative weighting that is changed in the cost function.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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