Networks with trainable amplitude of activation functions