-
Notifications
You must be signed in to change notification settings - Fork 1
/
InputOutputScript.py
37 lines (29 loc) · 1.07 KB
/
InputOutputScript.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
import threeWay
import numpy as np
def simulateNetwork(inputStrengths):
argDict = threeWay.getArgs()
print argDict
numTestingExamples = 1
testingNoise = 0
argDict['numExamples'] = numTestingExamples
argDict['testMode'] = True
argDict['weightPath'] = os.getcwd()+'/sortedWeights/'
argDict['noise'] = testingNoise
argDict['inputType'] = 'InputOutput'
argDict['inputWeight'] = 0.12
argDict['recurrentWeight'] = 0.001
argDict['singleExampleTime'] = 5.0
for inputStrength in inputStrengths:
argDict['targetPath'] = os.getcwd()+'/InputOutput/in_'+str(inputStrength)+'/'
argDict['gaussianPeak'] = inputStrength
relNet = threeWay.RelationalNetwork(**argDict)
relNet.createNetwork()
relNet.run()
del relNet
if __name__ == "__main__":
inputStrengths = np.logspace(-0.5, 2.3, 20, base=10)
# simulateNetwork(inputStrengths)
activityDataPath = os.getcwd()+'/InputOutput/'
import InputOutputUtil
InputOutputUtil.plotActivity(activityDataPath, inputStrengths)