maxpooling (Calls: 1962, Time: 306.131 s)
Generated 19-Jun-2021 04:39:10 using performance time.
function in file /nfs/inm_phd/07/d07944009/2021/0618-proj6/simpleNN/MATLAB/cnn/maxpooling.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
feedforward | function | 1962 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
10 | Z = Z(P, :); | 1962 | 156.206 s | 51.0% | ![]() |
19 | idx_pool = P(max_id); | 1962 | 87.829 s | 28.7% | ![]() |
13 | [Z, max_id] = max(Z); | 1962 | 55.887 s | 18.3% | ![]() |
18 | max_id = reshape(max_id, d*out... | 1962 | 3.315 s | 1.1% | ![]() |
26 | end | 1962 | 2.460 s | 0.8% | ![]() |
All other lines | 0.433 s | 0.1% | ![]() | ||
Totals | 306.131 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
gpu | function | 1962 | 0.171 s | 0.1% | ![]() |
Self time (built-ins, overhead, etc.) | 305.960 s | 99.9% | ![]() | ||
Totals | 306.131 s | 100% |
Line number | Message |
18 | If you intend to specify expression precedence, use parentheses () instead of brackets []. |
24 | If you intend to specify expression precedence, use parentheses () instead of brackets []. |
Total lines in function | 26 |
Non-code lines (comments, blank lines) | 7 |
Code lines (lines that can run) | 19 |
Code lines that did run | 16 |
Code lines that did not run | 3 |
Coverage (did run/can run) | 84.21 % |
time | Calls | line | |
---|---|---|---|
1 | function [Z, idx_pool, R_Z] = maxpooling(model, net, Zin, m, R_Zin) | ||
2 | |||
0.003 | 1962 | 3 | a = model.ht_conv(m); |
0.002 | 1962 | 4 | b = model.wd_conv(m); |
0.003 | 1962 | 5 | d = model.ch_input(m+1); |
0.002 | 1962 | 6 | h = model.wd_subimage_pool(m); |
7 | |||
0.010 | 1962 | 8 | P = net.idx_phiZ_pool{m}; |
0.046 | 1962 | 9 | Z = reshape(Zin, d*a*b, []); |
156.206 | 1962 | 10 | Z = Z(P, :); |
0.058 | 1962 | 11 | Z = reshape(Z, h*h, []); |
12 | |||
55.887 | 1962 | 13 | [Z, max_id] = max(Z); |
0.056 | 1962 | 14 | Z = reshape(Z, d, []); |
15 | |||
0.013 | 1962 | 16 | outa = model.ht_input(m+1); |
0.003 | 1962 | 17 | outb = model.wd_input(m+1); |
3.315 | 1962 | 18 | max_id = reshape(max_id, d*outa*outb, []) + h*h*gpu([0:d*outa*outb-1])'; |
87.829 | 1962 | 19 | idx_pool = P(max_id); |
20 | |||
0.199 | 1962 | 21 | if exist('R_Zin', 'var') |
22 | R_Z = reshape(R_Zin, d*a*b, []); | ||
23 | |||
24 | idx = idx_pool + gpu([0:size(max_id, 2)-1])*d*a*b; | ||
25 | R_Z = reshape(R_Z(idx), d, []); | ||
2.460 | 1962 | 26 | end |
Other subfunctions in this file are not included in this listing.