Skip to content

Commit

Permalink
bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
suhangpro committed Mar 31, 2015
1 parent 8ceb942 commit 8a452b5
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions imdb_compute_cnn_features.m
Original file line number Diff line number Diff line change
Expand Up @@ -223,22 +223,16 @@
% -------------------------------------------------------------------------
featCell = cell(1,numel(layers.name));
for fi=1:numel(layers.name),
if strcmp(layers.name{fi}(1:2), 'fc') ... % fully connected layers
|| strcmp(layers.name{fi}, 'prob') ... % output layer
|| strcmp(layers.name{fi}, 'viewpool'), % viewpool layer
featCell{fi}.x = zeros(nImgs*nSubWins,layers.sizes(3,fi));
featCell{fi}.imdb = imdb;
featCell{fi}.modelName = modelName;
featCell{fi}.layerName = layers.name{fi};
if nViews>1,
featCell{fi}.sid = reshape(repmat([1:nImgs],[nSubWins,1]),...
[nImgs*nSubWins,1]);
else
featCell{fi}.id = reshape(repmat([1:nImgs],[nSubWins,1]),...
[nImgs*nSubWins,1]);
end
featCell{fi}.x = zeros(nImgs*nSubWins,layers.sizes(3,fi));
featCell{fi}.imdb = imdb;
featCell{fi}.modelName = modelName;
featCell{fi}.layerName = layers.name{fi};
if nViews>1,
featCell{fi}.sid = reshape(repmat([1:nImgs],[nSubWins,1]),...
[nImgs*nSubWins,1]);
else
error('feature type (%s) not yet supported.', layers.name{fi});
featCell{fi}.id = reshape(repmat([1:nImgs],[nSubWins,1]),...
[nImgs*nSubWins,1]);
end
end
fprintf('Loading raw features: \n');
Expand Down

0 comments on commit 8a452b5

Please sign in to comment.