MCPcopy Create free account
hub / github.com/BindsNET/bindsnet / driver

Function driver

bindsnet/environment/dot_simulator.py:492–505  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

490
491
492def driver():
493 steps = 200
494 dotSim = DotSimulator(200)
495 dotSim.reset()
496
497 grids = np.zeros((steps, 28, 28))
498 directions = np.zeros(steps)
499 done = False
500 for t in range(steps):
501 grids[t], reward, done, info = dotSim.step(0)
502 directions[t] = info["direction"]
503
504 vals, cnts = np.unique(directions, return_counts=True)
505 print(vals, cnts / steps)
506
507
508if __name__ == "__main__":

Callers 1

dot_simulator.pyFile · 0.70

Calls 3

resetMethod · 0.95
stepMethod · 0.95
DotSimulatorClass · 0.85

Tested by

no test coverage detected