How to make the weight obtained by convolution2dlayer non-negative?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
CHAO WANG
el 20 de Dic. de 2020
Comentada: CHAO WANG
el 5 de En. de 2021
I am training a simple network. I need to constrain the weights of one layer of convolution2dlayer to be >0. For example, in keras, Layer weight constraints are implemented using tf.keras.constraints.NonNeg(). Can this function be realized in matlab? If there is no direct way, are there indirect constraints?
0 comentarios
Respuesta aceptada
Abhishek Gupta
el 23 de Dic. de 2020
Hi,
As per my understanding, you want to constrain the weights of a convolution2DLayer in MATLAB. You can do so by accessing the weights of a layer as shown below: -
net.LW{i,j}
Referring to the following resources, which might help you in resolving the issue: -
Más respuestas (0)
Ver también
Categorías
Más información sobre Deep Learning Toolbox 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!