def printCentImage(layer, cent): l = pd.GetCentroidImageWidth(network.getNetwork(), layer) l = l * l channel = 0 fa = pd.SWIG_FloatArray_frompointer(network.getCentroidImage(channel, layer, cent)) for i in xrange(l): print fa[i]
def printStats(): n = dn.getNode(7,0,0) print "Winner: %i" %(n.winner) starv = pd.SWIG_FloatArray_frompointer( n.starv ) for c in range(n.nb): print "starv %i: %f" % (c, starv[c]) print ""
def printStats(): """ Prints the winning centriod index and starvation trace for the top node.""" n = top_node() print "Winner: %i" % (n.winner) starv = pd.SWIG_FloatArray_frompointer(n.starv) for c in xrange(n.nb): print "starv %i: %f" % (c, starv[c]) print ""
def freezeTopCentroidsExcept(lucky_centroid): if lucky_centroid == None: return starv = pd.SWIG_FloatArray_frompointer(top_node().starv) small = 1e-6 for c in xrange(top_node().nb): starv[c] = 1 starv[lucky_centroid] = small
def printCentImage(layer, cent): l = pd.GetCentroidImageWidth(dn.getNetwork(), layer) l = l * l fa = pd.SWIG_FloatArray_frompointer( dn.getCentroidImage(layer, cent)) for i in range(l): print fa[i]