'VStrideY': 2, 'VStrideX': 2, 'patchSizeX': 12, 'patchSizeY': 12, 'numV': 128, #####New encode parapms##### 'maxPool': True, #Controls max or avg pool } print "Done init" est = np.zeros((testDataObj.numImages)) gt = np.zeros((testDataObj.numImages)) #Allocate tensorflow object #This will build the graph tfObj = Supervised(params, trainDataObj.inputShape) assert(testDataObj.numImages % params["batchSize"] == 0) for i in range(testDataObj.numImages/params["batchSize"]): print i*params["batchSize"], "out of", testDataObj.numImages (inImage, inGt) = testDataObj.getData(params["batchSize"]) outVals = tfObj.evalModel(inImage, inGt = inGt, plot=False) tfObj.timestep += 1 v = np.argmax(outVals, axis=1) startIdx = i*batch endIdx = startIdx + params["batchSize"] est[startIdx:endIdx] = v gt[startIdx:endIdx] = inGt
'displayPeriod': 100, #Batch size 'batchSize': 4, #Learning rate for optimizer 'learningRate': 1e-4, 'numClasses': 10, 'epsilon': 1e-8, 'regularizer': 'none', 'regWeight': .3, #####ISTA PARAMS###### 'VStrideY': 2, 'VStrideX': 2, 'patchSizeX': 12, 'patchSizeY': 12, 'numV': 256, #####New encode parapms##### 'maxPool': True, #Controls max or avg pool 'preTrain': False, } #Allocate tensorflow object #This will build the graph tfObj = Supervised(params, trainDataObj) print("Done init") tfObj.runModel(trainDataObj, testDataObj=testDataObj, numTest=256) print("Done run") tfObj.closeSess()
'outerSteps': 500, #1000000, 'innerSteps': 100, #300, #Batch size 'batchSize': 128, #Learning rate for optimizer 'learningRate': 1e-4, 'numClasses': 10, 'epsilon': 1e-8, 'regularizer': 'none', 'regWeight': .3, #####ISTA PARAMS###### 'VStrideY': 2, 'VStrideX': 2, 'patchSizeX': 12, 'patchSizeY': 12, 'numV': 128, #####New encode parapms##### 'maxPool': True, #Controls max or avg pool } #Allocate tensorflow object #This will build the graph tfObj = Supervised(params, trainDataObj.inputShape) print("Done init") tfObj.runModel(trainDataObj, testDataObj=testDataObj) print("Done run") tfObj.closeSess()
'batchSize': 128, #Learning rate for optimizer 'learningRate': 1e-4, 'numClasses': 10, 'epsilon': 1e-8, 'regularizer': 'none', 'regWeight': .3, #####ISTA PARAMS###### 'VStrideY': 2, 'VStrideX': 2, 'patchSizeX': 12, 'patchSizeY': 12, 'numV': 128, #####New encode parapms##### 'maxPool': True, #Controls max or avg pool } #Allocate tensorflow object #This will build the graph tfObj = Supervised(params, trainDataObj.inputShape) print "Done init" tfObj.runModel(trainDataObj, testDataObj = testDataObj) print "Done run" tfObj.closeSess()
'VStrideY': 2, 'VStrideX': 2, 'patchSizeX': 12, 'patchSizeY': 12, 'numV': 128, #####New encode parapms##### 'maxPool': True, #Controls max or avg pool } print "Done init" est = np.zeros((testDataObj.numImages)) gt = np.zeros((testDataObj.numImages)) #Allocate tensorflow object #This will build the graph tfObj = Supervised(params, trainDataObj.inputShape) assert (testDataObj.numImages % params["batchSize"] == 0) for i in range(testDataObj.numImages / params["batchSize"]): print i * params["batchSize"], "out of", testDataObj.numImages (inImage, inGt) = testDataObj.getData(params["batchSize"]) outVals = tfObj.evalModel(inImage, inGt=inGt, plot=False) tfObj.timestep += 1 v = np.argmax(outVals, axis=1) startIdx = i * batch endIdx = startIdx + params["batchSize"] est[startIdx:endIdx] = v gt[startIdx:endIdx] = inGt
'learningRate': 1e-4, 'numClasses': 10, 'epsilon': 1e-8, 'regularizer': 'none', 'regWeight': .3, #####ISTA PARAMS###### 'VStrideY': 2, 'VStrideX': 2, 'patchSizeX': 12, 'patchSizeY': 12, 'numV': 256, #####New encode parapms##### 'maxPool': True, #Controls max or avg pool 'preTrain': False, } #Allocate tensorflow object #This will build the graph tfObj = Supervised(params, trainDataObj) print("Done init") tfObj.runModel(trainDataObj, testDataObj = testDataObj, numTest=256) print("Done run") tfObj.closeSess()