Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instructions on setting up Keras and Tensorflow for AutoEncoder in PyOD #19

Closed
yzhao062 opened this issue Sep 4, 2018 · 1 comment
Closed
Assignees

Comments

@yzhao062
Copy link
Owner

yzhao062 commented Sep 4, 2018

It is nice that PyOD includes some neural network based models, such as AutoEncoder. However, you may find that after pip install pyod, AutoEncoder models do not run. This is expected since I do not want PyOD relies on too many packages, and not everyone needs to run AutoEncoder.

**If you have tensorflow-gpu installed, keras would automatically run with GPU. **
If you want to run AutoEncoder, please first install keras+a backend library, e.g., tensorflow. Either of the following two should do the installation for you:

  • pip install keras tensorflow or pip install keras tensorflow-gpu
  • conda install keras tensorflow or pip install keras tensorflow-gpu

You need tensorflow-gpu if your device have GPU and want to leverage it.

After keras and tensorflow being installed, you are ready to run auto_encoder_example.py.

Here are some potential error messages you may encounter:

1. ModuleNotFoundError: No module named 'theano'

In this case, you should specify keras backend to the one you want to use, e.g., TensorFlow
Go to $HOME/.keras/keras.json, and change the "backend" to "tensorflow"

2. ModuleNotFoundError: No module named 'error'

In this case, you need to install keras and tensorflow with conda, which can either be done in the GUI or simply use "conda install keras" and "conda install tensorflow"

@yzhao062 yzhao062 self-assigned this Sep 4, 2018
@yzhao062 yzhao062 changed the title Running AutoEncoder with Keras may throw errors (see solutions here) Instructions on setting up TensorFlow and Keras for AutoEncoder Sep 4, 2018
@yzhao062 yzhao062 changed the title Instructions on setting up TensorFlow and Keras for AutoEncoder Instructions on setting up Keras and Tensorflow for AutoEncoder in PyOD Sep 6, 2018
@yzhao062
Copy link
Owner Author

Replaced by wiki page. Please check the latest update there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant