kebwi / CM1K_emulator

An emulator of General Vision's CM1K neuromorphic chip, including modeling experiments using several popular public datasets
http://keithwiley.com/software/CM1K_emulator.shtml
MIT License
10 stars 4 forks source link

Cannot write NSR in SR mode -- default unit tests fail #2

Open schwab opened 6 years ago

schwab commented 6 years ago

When running default tests, get ValueError. This is on python 2.7/ubuntu 17.04. Any ideas what's up with the first test?

/src$ python test.py                                                            
test_minimal_01                                                    
Traceback (most recent call last):                                 
  File "test.py", line 1783, in <module>                           
    main()                                                         
  File "test.py", line 1755, in main                               
    run_unit_test_01(1)                                            
  File "test.py", line 74, in run_unit_test_01                     
    network.learn(input_comps, cat, cxt)                           
  File "/mnt/extradrive1/projects/CM1K_emulator/src/cm1k_emulator.py", line 774, in learn                                              
    self.broadcast(input_, gcr)                                    
  File "/mnt/extradrive1/projects/CM1K_emulator/src/cm1k_emulator.py", line 762, in broadcast                                          
    return self.read_nsr_id(), self.read_nsr_unc(), self.firing_neurons                                                                
  File "/mnt/extradrive1/projects/CM1K_emulator/src/cm1k_emulator.py", line 552, in read_nsr_id                                        
    raise ValueError("Can't write NSR in SR mode")                 
ValueError: Can't write NSR in SR mode                             
mcstar@oryx-pro:/mnt/extradrive1/projects/CM1K_emulator/src$ 
aragont commented 4 years ago

Try replacing Enum with IntEnum in cm1k_emulator.py