gtnn.network

gtnn.network.activation

Module with some basic neuron activation functions.

class gtnn.network.activation.Identity[source]

Identity activation function

derivative(x)[source]
Returns:always 1.0
value(x)[source]
Returns:x
class gtnn.network.activation.LogSigmoid(outMin, outMax)[source]

Scaled sigmoid activation function

derivative(x)[source]
Returns:scaled sigmoid’s derivative
value(x)[source]
Returns:scaled sigmoid

gtnn.network.net

class gtnn.network.net.Net(nInput, nOutput, graph=<Graph object, directed, with 0 vertices and 0 edges at 0x2ab54322ce10>)[source]

Bases: object

This is a wrapper for the graph_tool.Graph object. One can register vertex/edge properties and use them in algorithm implementation. It also implements basic forward and backward operations.

addEdgeProperty(name, typeName)[source]
addVertexProperty(name, typeName)[source]
backward(outputErr=[])[source]
forward(inputVals=[])[source]
prepare()[source]

Computes ans saves the topological sort of the graph for future use.