I want to customize a cross-entropy classification loss function. In this loss, I want to add parameters that can be learned, but after I write it out, I don’t support adding it. How can I solve it?
unknow attribute name "Learnable"???
Is it so inflexible? I hope that future versions will greatly support the freedom and flexibility of "Define Custom Layer" in many aspects! ! !
classdef myClassificationLayer < nnet.layer.ClassificationLayer
properties (Learnable)
kernel
end
properties
end
methods
function layer = myClassificationLayer()
...
end
function loss = forwardLoss(layer, Y, T)
...
end
function dLdY = backwardLoss(layer, Y, T)
...
end
end
end
0 Comments
Sign in to comment.