mlech26l / ncps

PyTorch and TensorFlow implementation of NCP, LTC, and CfC wired neural models
https://www.nature.com/articles/s42256-020-00237-3
Apache License 2.0
1.86k stars 297 forks source link

AttributeError: 'WiredCfCCell' object has no attribute 'register_module' #38

Closed Tiantian-my closed 1 year ago

Tiantian-my commented 1 year ago

When using 'AutoNCP' method, I met an error as the title said. Then I went into the file "...\ncps\torch\wired_cfc_cell.py" and found the method 'self.register_module' which hasn't been declared (or just I don't find it). I wonder where does 'register_module' come from. I would appreciate it if you can help me.

mlech26l commented 1 year ago

What version of Pytorch are you using?

zlgenuine commented 1 year ago

I used pytorch=1.8.1 and met the same error.

zlgenuine commented 1 year ago

emergency call.

mlech26l commented 1 year ago

ncps requires PyTorch version 1.13

zlgenuine commented 1 year ago

Cold! Thanks a lot.

Tiantian-my commented 1 year ago

Thanks a lot! After putting forward the issue, I changed to use TensorFlow. Finally fixed it by using correct version of TensorFlow2.

mlech26l commented 1 year ago

Is is possible that in your PyTorch code you import the TensorFlow as well? Something like

import ncps.tf
Tiantian-my commented 1 year ago

emm... I dont think so but thanks! : )