feedforward (Calls: 654, Time: 922.700 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/feedforward.m
Copy to new window for comparing multiple runs
| Function Name | Function Type | Calls |
| lossgrad_subset | function | 649 |
| Jacobian | function | 5 |
| Line Number | Code | Calls | Total Time | % Time | Time Plot |
| 10 | net.phiZ{m} = padding_and_phiZ... | 1962 | 457.897 s | 49.6% | |
| 14 | [net.Z{m+1}, net.idx_pool{m}] ... | 1962 | 332.356 s | 36.0% | |
| 11 | net.Z{m+1} = max(model.weight{... | 1962 | 131.892 s | 14.3% | |
| 25 | net.Z{L+1} = model.weight{L}*n... | 654 | 0.426 s | 0.0% | |
| 4 | net.Z{1} = reshape(gpu(data), ... | 654 | 0.072 s | 0.0% | |
| All other lines | 0.057 s | 0.0% | |||
| Totals | 922.700 s | 100% |
| Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
| padding_and_phiZ | function | 1962 | 409.333 s | 44.4% | |
| maxpooling | function | 1962 | 306.131 s | 33.2% | |
| gpu | function | 654 | 0.034 s | 0.0% | |
| Self time (built-ins, overhead, etc.) | 207.202 s | 22.5% | |||
| Totals | 922.700 s | 100% |
| Total lines in function | 25 |
| Non-code lines (comments, blank lines) | 8 |
| Code lines (lines that can run) | 17 |
| Code lines that did run | 15 |
| Code lines that did not run | 2 |
| Coverage (did run/can run) | 88.24 % |
time | Calls | line | |
|---|---|---|---|
1 | function net = feedforward(data, model, net) | ||
2 | |||
< 0.001 | 654 | 3 | num_data = size(data, 2); |
0.072 | 654 | 4 | net.Z{1} = reshape(gpu(data), model.ch_input(1), []); |
5 | |||
0.001 | 654 | 6 | L = model.L; |
< 0.001 | 654 | 7 | LC = model.LC; |
8 | |||
0.001 | 654 | 9 | for m = 1 : LC |
457.897 | 1962 | 10 | net.phiZ{m} = padding_and_phiZ(model, net, net.Z{m}, m, num_data); |
131.892 | 1962 | 11 | net.Z{m+1} = max(model.weight{m}*net.phiZ{m} + model.bias{m}, 0); |
12 | |||
0.009 | 1962 | 13 | if model.wd_subimage_pool(m) > 1 |
332.356 | 1962 | 14 | [net.Z{m+1}, net.idx_pool{m}] = maxpooling(model, net, net.Z{m+1}, m); |
< 0.001 | 1962 | 15 | end |
0.005 | 1962 | 16 | end |
17 | |||
0.006 | 654 | 18 | dab = model.ch_input(LC+1) * model.wd_input(LC+1) * model.ht_input(LC+1); |
0.022 | 654 | 19 | net.Z{LC+1} = reshape(net.Z{LC+1}, dab, []); |
20 | |||
0.002 | 654 | 21 | for m = LC+1 : L-1 |
22 | net.Z{m+1} = max(model.weight{m}*net.Z{m} + model.bias{m}, 0); | ||
23 | end | ||
24 | |||
0.426 | 654 | 25 | net.Z{L+1} = model.weight{L}*net.Z{L} + model.bias{L}; |
Other subfunctions in this file are not included in this listing.