maxpooling (Calls: 2595, Time: 410.481 s)
Generated 19-Jun-2021 04:01:57 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 | 1947 |
Jv | function | 648 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
10 | Z = Z(P, :); | 2595 | 202.281 s | 49.3% | ![]() |
19 | idx_pool = P(max_id); | 2595 | 102.241 s | 24.9% | ![]() |
13 | [Z, max_id] = max(Z); | 2595 | 55.846 s | 13.6% | ![]() |
25 | R_Z = reshape(R_Z(idx), d, [])... | 648 | 35.595 s | 8.7% | ![]() |
26 | end | 2595 | 8.180 s | 2.0% | ![]() |
All other lines | 6.339 s | 1.5% | ![]() | ||
Totals | 410.481 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
gpu | function | 3243 | 0.268 s | 0.1% | ![]() |
Self time (built-ins, overhead, etc.) | 410.213 s | 99.9% | ![]() | ||
Totals | 410.481 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 | 19 |
Code lines that did not run | 0 |
Coverage (did run/can run) | 100.00 % |
time | Calls | line | |
---|---|---|---|
1 | function [Z, idx_pool, R_Z] = maxpooling(model, net, Zin, m, R_Zin) | ||
2 | |||
0.007 | 2595 | 3 | a = model.ht_conv(m); |
0.004 | 2595 | 4 | b = model.wd_conv(m); |
0.004 | 2595 | 5 | d = model.ch_input(m+1); |
0.003 | 2595 | 6 | h = model.wd_subimage_pool(m); |
7 | |||
0.016 | 2595 | 8 | P = net.idx_phiZ_pool{m}; |
0.074 | 2595 | 9 | Z = reshape(Zin, d*a*b, []); |
202.281 | 2595 | 10 | Z = Z(P, :); |
0.090 | 2595 | 11 | Z = reshape(Z, h*h, []); |
12 | |||
55.846 | 2595 | 13 | [Z, max_id] = max(Z); |
0.092 | 2595 | 14 | Z = reshape(Z, d, []); |
15 | |||
0.018 | 2595 | 16 | outa = model.ht_input(m+1); |
0.004 | 2595 | 17 | outb = model.wd_input(m+1); |
3.950 | 2595 | 18 | max_id = reshape(max_id, d*outa*outb, []) + h*h*gpu([0:d*outa*outb-1])'; |
102.241 | 2595 | 19 | idx_pool = P(max_id); |
20 | |||
0.294 | 2595 | 21 | if exist('R_Zin', 'var') |
0.016 | 648 | 22 | R_Z = reshape(R_Zin, d*a*b, []); |
23 | |||
1.712 | 648 | 24 | idx = idx_pool + gpu([0:size(max_id, 2)-1])*d*a*b; |
35.595 | 648 | 25 | R_Z = reshape(R_Z(idx), d, []); |
8.180 | 2595 | 26 | end |
Other subfunctions in this file are not included in this listing.