Skip to content

Instantly share code, notes, and snippets.

@biphasic
Last active September 30, 2020 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biphasic/c51ce8ecb20d9dafdd1563804083af31 to your computer and use it in GitHub Desktop.
Save biphasic/c51ce8ecb20d9dafdd1563804083af31 to your computer and use it in GitHub Desktop.
sparse connection mask error
import numpy as np
import nxsdk.api.n2a as nx
net = nx.NxNet()
cxSrc = net.createCompartmentGroup(size=2, prototype=nx.CompartmentPrototype(biasMant=1000, biasExp=6))
cxDst = net.createCompartmentGroup(size=2, prototype=nx.CompartmentPrototype(vThMant=100))
prototypes = [nx.ConnectionPrototype(weightExponent=1),
nx.ConnectionPrototype(weightExponent=2)]
conn = cxSrc.connect(cxDst,
prototype=prototypes,
prototypeMap=np.array([[1,1],
[1,1]]),
connectionMask=np.array([[0,0],
[0,1]]))
net.run(100)
net.disconnect()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment