Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'inline' #16

Open
sulimani opened this issue Mar 14, 2019 · 2 comments
Open

AttributeError: 'NoneType' object has no attribute 'inline' #16

sulimani opened this issue Mar 14, 2019 · 2 comments

Comments

@sulimani
Copy link

I'm trying to run your code and I'm getting the following error: 'NoneType' object has no attribute 'inline'

I tried to run the code using PyCharm on virtual Ubuntu 18.4 and I installed all the packages required. It didn't work. So, I installed Anaconda 2 and I tried to run it on Spyder, but I got the same error as well.
Can you please advise me on how to solve this issue.

$ python csnn_pc_mnist.py

Optional argument values:

  • plot : False
  • num_train : 10000
  • random_seed : 0
  • conv_features : 25
  • train_time : 0.35
  • conv_size : 16
  • save_best_model : True
  • test_time : 0.35
  • conv_stride : 4
  • test_rest : 0.15
  • dt : 0.5
  • mode : train
  • num_test : 10000
  • train_rest : 0.15
  • weight_update_interval : 10
  • update_interval : 100
  • start_input_intensity : 2.0

Time needed to load data: 13.1599719524

...Creating neuron group: A
...Creating recurrent connections
...Creating monitors for: A

...Creating connections between X and A
...Creating STDP for connection XA
Traceback (most recent call last):
File "csnn_pc_mnist.py", line 1027, in
build_network()
File "csnn_pc_mnist.py", line 488, in build_network
pre=eqs_stdp_pre_ee, post=eqs_stdp_post_ee, wmin=0., wmax=wmax_ee)
File "/home/maram/.local/lib/python2.7/site-packages/brian/stdp.py", line 197, in init
delay_post=delay_post)
File "/home/maram/.local/lib/python2.7/site-packages/brian/experimental/c_stdp.py", line 41, in init
C.compress()
File "/home/maram/.local/lib/python2.7/site-packages/brian/connections/delayconnection.py", line 230, in compress
self.delayvec = self.W.connection_matrix(copy=True)
File "/home/maram/.local/lib/python2.7/site-packages/brian/connections/constructionmatrix.py", line 66, in connection_matrix
return SparseConnectionMatrix(self, **self.init_kwds)
File "/home/maram/.local/lib/python2.7/site-packages/brian/connections/connectionmatrix.py", line 328, in init
weave.inline(code, ['nnz', 'allj', 'allcoldataindices',
AttributeError: 'NoneType' object has no attribute 'inline'

@djsaunde
Copy link
Owner

Hi @sulimani, I'm not really supporting this code anymore, but you can find similar code here and here.

As for your error, it looks like there's a problem with your brian / weave installation; I recommend trying to fix the problems with those packages. However, the version of brian (and other packages, I'm sure) used for this project are now out of date. So, I don't really expect it to work.

Repository owner deleted a comment from Hananel-Hazan Mar 15, 2019
@tehreemnaqvi
Copy link

Hi, It's tehreem.I have an issue while evaluating this code.
The error is like is:
sum_accurracy = [0] * num_tests
TypeError: can't multiply sequence by non-int of type 'float'.
What should i do?
Waiting for your kind reply.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants