You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
this error is being presented when I use this pybrain library
this is my code:
from pybrain.structure import FeedForwardNetwork
from pybrain.structure import LinearLayer, SigmoidLayer, BiasUnit
from pybrain.structure import FullConnection
rneural = FeedForwardNetwork()
CE = LinearLayer(4)
CO = SigmoidLayer(6)
CS = SigmoidLayer(1)
b1 = BiasUnit()
b2 = BiasUnit()
EO = FullConnection(CE, CO)
OS = FullConnection(CO, CS)
bO = FullConnection(b1, CO)
bS = FullConnection(b2, CS)
rneural.sortModule()
print(rneural)
when I run:
python3 rneural.py
Traceback (most recent call last):
File "/home/warwick/Desktop/scriptsinpython/ai/rneural.py", line 1, in
from pybrain.structure import FeedForwardNetwork
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/init.py", line 1, in
from pybrain.structure.init import *
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/structure/init.py", line 2, in
from pybrain.structure.modules.init import *
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/structure/modules/init.py", line 2, in
from pybrain.structure.modules.gate import GateLayer, DoubleGateLayer, MultiplicationLayer, SwitchLayer
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/structure/modules/gate.py", line 10, in
from pybrain.tools.functions import sigmoid, sigmoidPrime
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/tools/functions.py", line 4, in
from scipy.linalg import inv, det, svd, logm, expm2
ImportError: cannot import name 'expm2' from 'scipy.linalg' (/home/warwick/environments/my_env/lib/python3.10/site-packages/scipy/linalg/init.py)
I've tried several solutions but the only one I haven't tried is to downgrade python3.10, I think it's not the most correct solution if anyone knows how to fix this
thanks
The text was updated successfully, but these errors were encountered:
Welcome to a legacy project! The current version of SciPy as of this writing is 1.8.1 and expm2 matrix exponential function is deprecated in 0.13.0. (This also happened for expm3)
You should try to install an older version of Python and of course packages. As suggested Python 2.5 based on this line of code in setup.py in the root directory.
this error is being presented when I use this pybrain library
this is my code:
from pybrain.structure import FeedForwardNetwork
from pybrain.structure import LinearLayer, SigmoidLayer, BiasUnit
from pybrain.structure import FullConnection
rneural = FeedForwardNetwork()
CE = LinearLayer(4)
CO = SigmoidLayer(6)
CS = SigmoidLayer(1)
b1 = BiasUnit()
b2 = BiasUnit()
rneural.addModule(CE)
rneural.addModule(CO)
rneural.addModule(CS)
rneural.addModule(b1)
rneural.addModule(b2)
EO = FullConnection(CE, CO)
OS = FullConnection(CO, CS)
bO = FullConnection(b1, CO)
bS = FullConnection(b2, CS)
rneural.sortModule()
print(rneural)
when I run:
python3 rneural.py
Traceback (most recent call last):
File "/home/warwick/Desktop/scriptsinpython/ai/rneural.py", line 1, in
from pybrain.structure import FeedForwardNetwork
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/init.py", line 1, in
from pybrain.structure.init import *
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/structure/init.py", line 2, in
from pybrain.structure.modules.init import *
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/structure/modules/init.py", line 2, in
from pybrain.structure.modules.gate import GateLayer, DoubleGateLayer, MultiplicationLayer, SwitchLayer
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/structure/modules/gate.py", line 10, in
from pybrain.tools.functions import sigmoid, sigmoidPrime
File "/home/warwick/environments/my_env/lib/python3.10/site-packages/pybrain/tools/functions.py", line 4, in
from scipy.linalg import inv, det, svd, logm, expm2
ImportError: cannot import name 'expm2' from 'scipy.linalg' (/home/warwick/environments/my_env/lib/python3.10/site-packages/scipy/linalg/init.py)
I've tried several solutions but the only one I haven't tried is to downgrade python3.10, I think it's not the most correct solution if anyone knows how to fix this
thanks
The text was updated successfully, but these errors were encountered: