raw download clone
views 23
size 611 b
#apples Sigmoid to every element
def SigmoidArray(input):
    output = input
    for i in range(len(input)):
        output[i][0] = 1/(1+np.exp(-input[i][0]))
    return output

def TransitLayer(inputLayer, link, offset):
    output = link.dot(inputLayer) + offset
    return SigmoidArray(output)

link0 = np.array([[0.,0.,0.,0.],[-3.,2.,-3.,2.],[0.,0.,0.,0.],[0.,0.,0.,0.],
offset0 = np.array([[0.6],[0.],[0.],[0.],[0.53],[0.],[-3.1]])

Layer0 = userInput()
Layer1 = TransitLayer(Layer0,link0,offset0)
close fullscreen
Login or Register to edit or fork this paste. It's free.