Search code examples
machine-learningneural-networkpybrain

In PyBrain, when creating artificial neural networks, are the inputs to a neuron weighted and summed before being passed into the activation function?


I'm taking an introduction to machine learning class in school and all the ANN we've been shown have the inputs weighted and summed before being inputted into the activation function of any neuron.

I'm creating an ANN for homework and I was wondering if this is also done automatically in PyBrain?


Solution

  • Yes. Pybrain's various nodes offer inherit activation functions through the defined type. Refer to the documentation here:

    http://pybrain.org/docs/tutorial/netmodcon.html

    In creating modules manually, you define the type of activation function being used. Pybrain supports Sigmoid, Linear, Gaussian, Softmax, Tanh, and a few others if memory serves. To test this out create a single layer network and activate it.

    from pybrain.structure import SigmoidLayer
    module = SigmoidLayer(1)
    print module.activate([.05])