- https://www.mathworks.com/help/deeplearning/ug/train-generative-adversarial-network.html
- https://www.mathworks.com/help/deeplearning/ug/train-network-using-model-function.html
- https://www.mathworks.com/help/deeplearning/ug/train-a-siamese-network-to-compare-images.html
Neural Network: Custom Loss Function: Minimize Range/Amplitude
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
ThomasP
el 17 de Feb. de 2022
Respondida: Abolfazl Chaman Motlagh
el 17 de Feb. de 2022
Hello,
I have a dataset of errors and an LSTM neural network which is predicting these errors.
Overall, the network is doing a decent job, if I substract the predicted error from actual error on my test-set, the error is reduced by about 80%.
However, my max(abs(error)) (error = target - prediction) stays about the same, because the network overcorrects sometimes too much, which is a highly undesirable property for my case.
To handle these overcorrections, I would like to change my loss function.
Is there a possibility to tell the network to not minimize MeanSquaredError (as the last regressionLayer does it), but to tell it to minimize max(abs(error)) ?, i.e. I would allow the mean-error to be higher if the overall corrected maximum error will be lower
Thank you for any help
0 comentarios
Respuesta aceptada
Abolfazl Chaman Motlagh
el 17 de Feb. de 2022
From 2021a version, Matlab allows you to define and use customize data, layer, training loop, network and in as you need loss function. for more information follow below link:
for example for how to defien you own custom network or training, these are good examples:
but generally it made your work hard to follow all these from scratch.
so maybe just create a simple custom layer for your output and train your network. see this documentation:
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Sequence and Numeric Feature Data Workflows en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!