Added activation functions for nn.