Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 5 Current »

Setting Keras Environment

Prerequisites

For your convenience, you'd better install and use git bash.

Therefore, I will test on git bash or bash terminal integrated within VSCode.

Install Miniconda on Windows

Download: https://docs.conda.io/en/latest/miniconda.html

Setting Keras

Install Karas from Yaml

# Make yaml file.
$ vi environment-gpu.yml
name: tf-gpu-1.15

dependencies:
  - python=3.6
  - tensorflow-gpu=1.15
  - keras=2.3.1
  - scikit-learn
  - scipy
  - numpy
  - matplotlib
  - ipython
  - jupyter
  - pillow
  - opencv
  - graphviz
  - cython
  - pip:
      - pydot-ng

# Create conda env
$ conda env create -f environment-gpu.yml

# Enter tf-gpu-1.15 env
$ conda activate tf-gpu-1.15

If not able to activate a certain conda env, add this instruction into .bashrc

. ~/Miniconda3/etc/profile.d/conda.sh

# Check out the installed packages about cuda.
$ conda list
...
cudatoolkit               10.0.130                      0
cudnn                     7.6.5                cuda10.0_0
...
keras                     2.3.1                         0
keras-applications        1.0.8                      py_1
keras-base                2.3.1                    py36_0
keras-preprocessing       1.1.2              pyhd3eb1b0_0
...
tensorflow                1.15.0          gpu_py36h2b26d6b_0
tensorflow-base           1.15.0          gpu_py36h1afeea4_0
tensorflow-estimator      1.15.1             pyh2649769_0
tensorflow-gpu            1.15.0               h0d30ee6_0
...

  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.