当前位置: 首页 > 文档资料 > Edward 中文文档 >

Troubleshooting

优质
小牛编辑
129浏览
2023-12-01

Troubleshooting

Basic Installation

Edward depends on

  • NumPy (>=1.7)
  • Six (>=1.1.0)
  • TensorFlow (>=1.2.0rc0)

Installing edward by default also installs numpy and six if they are unavailable (or out-of-date).

Installing edward does not automatically install or update TensorFlow. We recommend installing it via

pip install tensorflow

To use Edward with GPUs, install tensorflow-gpu instead of tensorflow as

pip install tensorflow-gpu

See TensorFlow’s installation instructions for details, including how to set up NVIDIA software for TensorFlow with GPUs.

Full Installation

Edward has optional features that depend on external packages.

  • Any examples using real data sets typically require Observations (>=0.1.2)
    pip install observations

    Observations lets you load an extensive collection of data sets with minimal effort under a one-line interface. Observations was originally developed for Edward and it has since become a standalone library for general machine learning.

  • Neural networks are supported through any library operating on TensorFlow. For example: tf.layers, Keras (>=1.0)
    pip install keras==2.0.4

    and TensorFlow Slim (native in TensorFlow).

    Note that for Keras 2.0.5 and beyond, all neural net layer transformations cannot be directly applied on random variables anymore. For example, if x is a ed.RandomVariable object, one must call tf.convert_to_tensor before applying it to a layer transformation, Dense(256)(tf.convert_to_tensor(x)). See here for more details.

  • Notebooks require Jupyter (>=1.0.0)
    pip install jupyter
  • Visualization requires Matplotlib (>=1.3), Pillow (>=3.4.2), and Seaborn (>=0.3.1)
    pip install matplotlib
    pip install pillow
    pip install seaborn