本文整理汇总了Python中parameters.Parameters.getAllValues方法的典型用法代码示例。如果您正苦于以下问题:Python Parameters.getAllValues方法的具体用法?Python Parameters.getAllValues怎么用?Python Parameters.getAllValues使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类parameters.Parameters
的用法示例。
在下文中一共展示了Parameters.getAllValues方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: SpatialPooler
# 需要导入模块: from parameters import Parameters [as 别名]
# 或者: from parameters.Parameters import getAllValues [as 别名]
dataSet = parameters.getValue("dataSet")
trainingDataset = 'DataSets/OCR/characters/' + dataSet
trainingImages, trainingTags = data.getImagesAndTags(trainingDataset)
trainingVectors = encoder.imagesToVectors(trainingImages)
testingDataset = 'DataSets/OCR/characters/' + dataSet
# Pick a random combination of parameter values
#parameters.generateRandomCombination()
numCols = parameters.getValue("numCols")
synPermConn = parameters.getValue("synPermConn")
synPermDec = synPermConn*parameters.getValue("synPermDecFrac")
synPermInc = synPermConn*parameters.getValue("synPermIncFrac")
# Run it if it hasn't been tried yet
if parameters.getAllValues() not in combinations:
print "Parameter Combination: ", parameters.getAllValues()
# Instantiate our spatial pooler
sp = SpatialPooler(
inputDimensions=32**2, # Size of image patch
columnDimensions = numCols, # Number of potential features
potentialRadius = 10000, # Ensures 100% potential pool
potentialPct = 1, # Neurons can connect to 100% of input
globalInhibition = True,
localAreaDensity = -1, # Using numActiveColumnsPerInhArea
#localAreaDensity = 0.02, # one percent of columns active at a time
#numActiveColumnsPerInhArea = -1, # Using percentage instead
numActiveColumnsPerInhArea = 64,
# All input activity can contribute to feature output
stimulusThreshold = 0,
synPermInactiveDec = synPermDec,