Last active
September 30, 2020 09:51
-
-
Save biphasic/c51ce8ecb20d9dafdd1563804083af31 to your computer and use it in GitHub Desktop.
sparse connection mask error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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