logistic_sgd module, where to find it?

邮差的信 提交于 2019-12-01 22:44:03

问题


doing a deep learning tutorial and my python cannot find that module.

from logistic_sgd import LogisticRegression, load_data
ImportError: No module named logistic_sgd

How can i install it ?


回答1:


Download and Save logistic_sgd.py from the following link:

http://deeplearning.net/tutorial/code/logistic_sgd.py

Store it in the working directory. That's it!




回答2:


Actually, you should download all the code from the following link, it contains all the dependencies you need. Here is the source code: http://deeplearning.net/tutorial/code/




回答3:


To download all the code necessary, you can go to GitHub.

Citing from: http://deeplearning.net/tutorial/

The code is available on the Deep Learning Tutorial repositories.

If you aren't familiar with Git, you can download the source code in one zip archive file from there.




回答4:


are you using the Theano library, if you are, that means your project cannot find the Theano library, use

sys.path.append(r'~/TheanoDL')

to declare it at the beginning of your project, change the path of it with your Theano is in.

Note that it works for a project with a customed Theano library.(my situation)

Best luck!



来源:https://stackoverflow.com/questions/35792910/logistic-sgd-module-where-to-find-it

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!