only work with broadcasted layer operations

for consistency
Modifications to allow broadcasting to work properly
Remove duplicate definition of ^
added documentation for batch_size argument
NNLayer supports sparsity;
also some stylistic modifications to make the NNLayer operations read better and generalize
Copy layers upon modification
Merge both backprop functions into one
Derive mean activation during forward pass
Added pretraining function
Make pretrain() work with existing structs and training functions