Fixed bug in deepAutoencoder that caused gradients to be too large.