Question about transfer learning

32 views
Skip to first unread message

xacke...@gmail.com

unread,
Dec 31, 2018, 7:55:47 PM12/31/18
to mdCNN: Multidimensional CNN library in Matlab
Dear hagaygarty

Can mdCNN perform transfer learning?
For example, After training the MNIST dataset (the number of labels=10), can I use this pretrained network to train and test a different dataset that has the different number of labels (for, example,  the number of labels=2)?

Thank you!

Motohiko Yamazaki

Hagay Garty

unread,
Jan 1, 2019, 9:16:00 AM1/1/19
to mdCNN: Multidimensional CNN library in Matlab
Yes, it's possible. Create a new network in the same structure as the pre-trained one, but with one extra layer before the output layer. this should be added to the config file. The extra layer is type 'fc' with 2 output neurons (numFm=2).
Then, copy all the layers content from the pre-trained net to the new net (except for the added layer and output layer)
i.e
netNet.layers{1}  = net.layers{1} ;
netNet.layers{2}  = net.layers{2}; 
...

Afterwards, you can start training your new network using 'Train' function.

4

xacke...@gmail.com

unread,
Jan 1, 2019, 9:01:23 PM1/1/19
to mdCNN: Multidimensional CNN library in Matlab
Thank you.It successfully worked.
Reply all
Reply to author
Forward
0 new messages