Skip to content

Commit

Permalink
Model update and bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hellbell committed Mar 31, 2018
1 parent 2930281 commit 417abd4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion adnet_compile.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
%
% Sangdoo Yun, 2017.
if ispc
cudaRoot = 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5';
cudaRoot = 'C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v8.0';
else
cudaRoot = '/usr/local/cuda-8.0';
end
Expand Down
2 changes: 1 addition & 1 deletion adnet_demo.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
opts.printscreen = true;

rng(1004);
[results, t, p] = test_demo(net, vid_path, opts);
[results, t, p] = adnet_test(net, vid_path, opts);
fprintf('precision: %f, fps: %f\n', p(20), size(results, 1)/t);

16 changes: 10 additions & 6 deletions adnet_test.m
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,18 @@

net_fc_noah = copy(net_fc);
net_fc_noah.removeLayer('concat');
net_fc_noah.layers(4).inputs = 'x13';
net_fc_noah.params(3).value(:,:,512+1:end,:) = [];
net_fc_noah.layers(7).inputs = 'x16';
net_fc_noah.layers(8).inputs = 'x16';
net_fc_noah.params(5).value(:,:,512+1:end,:) = [];
net_fc_noah.params(7).value(:,:,512+1:end,:) = [];
net_fc_noah.rebuild();
net_fc_noah.move('gpu');
net_fc.move('gpu');

[net_fc_noah, ~] = train_fc_finetune_hem(net_fc_noah, opts, ...
pos_data, neg_data, pos_action_labels);
for fci = 1 : 8
if fci == 3
if fci == 5 || fci == 7
net_fc.params(fci).value(:,:,1:512,:) = net_fc_noah.params(fci).value;
else
net_fc.params(fci).value = net_fc_noah.params(fci).value;
Expand Down Expand Up @@ -328,16 +330,18 @@

net_fc_noah = copy(net_fc);
net_fc_noah.removeLayer('concat');
net_fc_noah.layers(4).inputs = 'x13';
net_fc_noah.params(3).value(:,:,512+1:end,:) = [];
net_fc_noah.layers(7).inputs = 'x16';
net_fc_noah.layers(8).inputs = 'x16';
net_fc_noah.params(5).value(:,:,512+1:end,:) = [];
net_fc_noah.params(7).value(:,:,512+1:end,:) = [];
net_fc_noah.rebuild();
net_fc_noah.move('gpu');
net_fc.move('gpu');

[net_fc_noah, ~] = train_fc_finetune_hem(net_fc_noah, opts, ...
pos_data, neg_data, pos_action_labels);
for fci = 1 : 8
if fci == 3
if fci == 5 || fci == 7
net_fc.params(fci).value(:,:,1:512,:) = net_fc_noah.params(fci).value;
else
net_fc.params(fci).value = net_fc_noah.params(fci).value;
Expand Down
Binary file modified models/net_rl.mat
Binary file not shown.

0 comments on commit 417abd4

Please sign in to comment.