How to use feature input layer in transfer learning to concatenate the features with the output of fully-connected layer using MATLAB
조회 수: 5 (최근 30일)
이전 댓글 표시
Following the above MATHWORKS example. While performing transfer learning from vgg16, I want to add a concatenation layer with two inputs. One input will be from the last pre-trained layer of the vgg16, which is input 1 (in1) that is true. But, at input 2 (in2) I want to add the hand-crafted features (in mat file), but I cannot make it properly. Please guide me on this. I'm using featureInputLayer to get features and want to use them to concatenate with in1.
close all; clear all; clc;
% Load Pre-trained CNN Model
net = vgg16;
% Replacing the last 3 layers
TransNet = [
net.Layers(1:end-3)
% featureInputLayer(280,'Name','in2')
concatenationLayer(1,2,'Name','concat')
fullyConnectedLayer(4096, 'Name','fc8')
softmaxLayer('Name','sm')
classificationLayer('Name','classification')];
analyzeNetwork(TransNet);
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
