Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
Please use this code for testing your trained method
  • Loading branch information
lpj0 authored Mar 20, 2019
1 parent cdb8fdc commit a2e3e4d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Training_Code/Processing_Im.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function output1 = Processing_Im(im, net, gpu, out_idx)
% tmp = net.params(48).value;
% net.params(48).value = net.params(68).value;
% net.params(68).value = tmp;

input = im2single(im(:,:,1));
if gpu
%input = gpuArray(input*4-2);
input = gpuArray(input);
end
net.eval({'input',input}) ;
%%% output (single)
output1 = gather(squeeze(gather(net.vars(out_idx).value+2)/4));
output1 = im2uint8(output1);
end

0 comments on commit a2e3e4d

Please sign in to comment.