-
Notifications
You must be signed in to change notification settings - Fork 71
/
return_network.m
executable file
·33 lines (30 loc) · 1.54 KB
/
return_network.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
function [layers, batch_size ] = return_network(network)
if network == 'caffe_reference_imagenet'
layers = {'fc8','fc7','fc6','conv5','conv4','conv3','conv2','conv1'};
batch_size = 128; % the batch size
elseif network == 'caffe_reference_places205'
layers = {'fc8','fc7','fc6','conv5','conv4','conv3','conv2','conv1'};
batch_size = 128;
elseif network == 'caffe_reference_imagenetplaces205'
layers = {'fc8','fc7','fc6','conv5','conv4','conv3','conv2','conv1'};
batch_size = 128;
elseif network == 'caffe_reference_places365'
layers = {'fc8','fc7','fc6','conv5','conv4','conv3','conv2','conv1'};
batch_size = 128;
elseif network == 'vgg16_imagenet'
layers = {'fc8', 'fc7','fc6','conv5_3','conv5_2','conv5_1','conv4_3','conv4_2','conv4_1','conv3_3','conv3_2','conv3_1','conv2_2','conv2_1','conv1_1'};
batch_size = 32;
elseif network == 'vgg16_places205'
layers = {'fc8', 'fc7', 'fc6','conv5_3','conv5_2','conv5_1','conv4_3','conv4_2','conv4_1','conv3_3','conv3_2','conv3_1','conv2_2','conv2_1','conv1_1'};
batch_size = 32;
elseif network = 'vgg16_places365'
layers = {'fc8a', 'fc7', 'fc6','conv5_3','conv5_2','conv5_1','conv4_3','conv4_2','conv4_1','conv3_3','conv3_2','conv3_1','conv2_2','conv2_1','conv1_1'};
batch_size = 32;
elseif network = 'vgg16_hybrid1365'
layers = {'fc8a', 'fc7', 'fc6','conv5_3','conv5_2','conv5_1','conv4_3','conv4_2','conv4_1','conv3_3','conv3_2','conv3_1','conv2_2','conv2_1','conv1_1'};
batch_size = 32;
else
disp('no such networks')
batch_size = 0
layers = {}
end