Open yiyunchen opened 5 years ago
thank you! and I am confused about the code:
for x = 1 : stride : (hei-size_input+1) for y = 1 : stride : (wid-size_input+1) x_l = stride_low(x-1)/stride + 1; y_l = stride_low(y-1)/stride + 1; if x_l+size_input/scale-1 > size(LR,1) || y_l+size_input/scale-1 > size(LR,2) continue; end count=count+1; end end
in generatedpatches. May I ask what this is trying to do. Thank you.
In matlab, pre-define the large matrix is useful to the memery.
For example,
n = 1000000;
A = zeros(1, n);
for i = 1:n
A(i) = i;
end
is better than
n = 1000000;
for i = 1:n
A(i) = i;
end
Is it used to compute the 'count'?
Yes. @yiyunchen
When I was runing the generatepatches.m, a error was raised that "undefined function or variable 'data_augmentation'. I would like asking about it, is it a default function or user defined function that no provided? thank you very much!