feedforward (Calls: 649, Time: 881.294 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/feedforward.m
Copy to new window for comparing multiple runs
Function Name | Function Type | Calls |
lossgrad_subset | function | 649 |
Line Number | Code | Calls | Total Time | % Time | Time Plot |
10 | net.phiZ{m} = padding_and_phiZ... | 1947 | 445.521 s | 50.6% | ![]() |
14 | [net.Z{m+1}, net.idx_pool{m}] ... | 1947 | 300.646 s | 34.1% | ![]() |
11 | net.Z{m+1} = max(model.weight{... | 1947 | 134.545 s | 15.3% | ![]() |
25 | net.Z{L+1} = model.weight{L}*n... | 649 | 0.449 s | 0.1% | ![]() |
4 | net.Z{1} = reshape(gpu(data), ... | 649 | 0.074 s | 0.0% | ![]() |
All other lines | 0.058 s | 0.0% | ![]() | ||
Totals | 881.294 s | 100% |
Function Name | Function Type | Calls | Total Time | % Time | Time Plot |
padding_and_phiZ | function | 1947 | 400.620 s | 45.5% | ![]() |
maxpooling | function | 1947 | 276.602 s | 31.4% | ![]() |
gpu | function | 649 | 0.033 s | 0.0% | ![]() |
Self time (built-ins, overhead, etc.) | 204.038 s | 23.2% | ![]() | ||
Totals | 881.294 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 | 649 | 3 | num_data = size(data, 2); |
0.074 | 649 | 4 | net.Z{1} = reshape(gpu(data), model.ch_input(1), []); |
5 | |||
0.001 | 649 | 6 | L = model.L; |
< 0.001 | 649 | 7 | LC = model.LC; |
8 | |||
0.001 | 649 | 9 | for m = 1 : LC |
445.521 | 1947 | 10 | net.phiZ{m} = padding_and_phiZ(model, net, net.Z{m}, m, num_data); |
134.545 | 1947 | 11 | net.Z{m+1} = max(model.weight{m}*net.phiZ{m} + model.bias{m}, 0); |
12 | |||
0.011 | 1947 | 13 | if model.wd_subimage_pool(m) > 1 |
300.646 | 1947 | 14 | [net.Z{m+1}, net.idx_pool{m}] = maxpooling(model, net, net.Z{m+1}, m); |
< 0.001 | 1947 | 15 | end |
0.004 | 1947 | 16 | end |
17 | |||
0.006 | 649 | 18 | dab = model.ch_input(LC+1) * model.wd_input(LC+1) * model.ht_input(LC+1); |
0.023 | 649 | 19 | net.Z{LC+1} = reshape(net.Z{LC+1}, dab, []); |
20 | |||
0.002 | 649 | 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.449 | 649 | 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.