cnrl / CoNeX

Cortical Network for everything!
MIT License
3 stars 0 forks source link

Make runnable test example #40

Closed realamirhe closed 1 year ago

realamirhe commented 1 year ago

Describe the bug Running Mnist on the latest version of pymonntorch and CoNex can not run the mnist example.

To Reproduce Seems that synapse.tensor has been replace with matrix but there need moderation on the hole project.

Steps to reproduce the behavior:

Traceback (most recent call last):
  File "/Users/<user>/code/work/@opensource/CoNeX/Example/test/mnist.py", line 118, in <module>
    net.initialize()
  File "/Users/<user>/code/work/@opensource/CoNeX/conex/nn/structure/neocortex.py", line 154, in initialize
    super().initialize(info=info, storage_manager=storage_manager)
  File "/Users/<user>/miniconda/envs/conex/lib/python3.10/site-packages/pymonntorch/NetworkCore/Network.py", line 183, in initialize
    self.initialize_behaviors()
  File "/Users/<user>/miniconda/envs/conex/lib/python3.10/site-packages/pymonntorch/NetworkCore/Network.py", line 189, in initialize_behaviors
    behavior.initialize(parent)
  File "/Users/<user>/code/work/@opensource/CoNeX/conex/behaviors/synapses/specs.py", line 33, in initialize
    synapse.src_delay = synapse.tensor(
  File "/Users/<user>/miniconda/envs/conex/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1614, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'StructuredSynapseGroup' object has no attribute 'tensor'
saeedark commented 1 year ago

This is not a bug. upgrade Pymonntorch to the last version.

realamirhe commented 1 year ago

I guess the issue happened because the latest released version available via pip is 0.1.1

$ pip index versions pymonntorch

pymonntorch (0.1.1)
Available versions: 0.1.1, 0.1.0
  INSTALLED: 0.1.1
  LATEST:    0.1.1

But the latest version released version in GitHub is 0.1.2 latest