06_cuda_cnn_hooks_init. Is the `children` function really needed?

Since

[m for m in model[:4]] == [m for m in children(model[:4])]

is True, why don’t we simply do

hooks = [Hook(l, append_stats) for l in model[:4]]

, instead of

hooks = [Hook(l, append_stats) for l in children(model[:4])]

?

1 Like