How to create personalized layers
1 view (last 30 days)
Show older comments
Hello everyone
I built a customed regression output layer named mylayer from here https://it.mathworks.com/help/deeplearning/ug/define-custom-regression-output-layer.html and I want to add it to the other layers of the network. I should use trainNetwork but I only found this example of definiton of layers:
layers = [
imageInputLayer([28 28 1])
convolution2dLayer(5,20)
batchNormalizationLayer
reluLayer
fullyConnectedLayer(1)
myLayer('myL')]
My problem however is NOT an image classification, I just want a couple of hidden layers with a number of neurons to be chosen and the usual weight and biases, passing as inputs a some scalar values. How should I define my object layers?
Thanks you in advice for your help!
0 Comments
Answers (1)
Anshika Chaurasia
on 31 Aug 2020
Hi Fabrizio,
It is my understanding that you have successfully created the custom Regression Ouput Layer – ‘myLayer’. You want to have some hidden layers and ‘myLayer’ in layers array. You could consider following codes:
layers = [
imageInputLayer([28 28 1])
fullyConnectedLayer(20)
reluLayer % optional
fullyConnectedLayer(1)
myLayer('myL')]
2 Comments
See Also
Categories
Find more on Image Data Workflows in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!