theano7_activation_function.py 705 B

123456789101112131415161718
  1. # View more python tutorials on my Youtube and Youku channel!!!
  2. # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg
  3. # Youku video tutorial: http://i.youku.com/pythontutorial
  4. # 7 - Activation function
  5. """
  6. The available activation functions in theano can be found in this link:
  7. http://deeplearning.net/software/theano/library/tensor/nnet/nnet.html
  8. The activation functions include but not limited to softplus, sigmoid, relu, softmax, elu, tanh...
  9. For the hidden layer, we could use relu, tanh, softplus...
  10. For classification problems, we could use sigmoid or softmax for the output layer.
  11. For regression problems, we could use a linear function for the output layer.
  12. """