Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian Rohleder authored and Maximilian Rohleder committed Apr 28, 2021
2 parents b9a1f17 + aa2d40a commit 3d5b520
Showing 1 changed file with 29 additions and 4 deletions.
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
# PyroNN layers as a tf custom op

This repository contains the pyronn layers configured as a tf-custom ops for windows.
Use the install instructions to install one of the provided builds, or follow the step-by-step guide to build for your own system.

## Install with pip

- create a python env with python 3.6 (I use conda for env management here, but any python 3.6 will do)

`conda create -n "pyronn" python=3.6`

- use the supplied requirements.txt file to install pyronn along with all necessary dependencies

`pip install -r https://raw.githubusercontent.com/maxrohleder/win-pyronn/master/requirements.txt`

- the approach above guarantees, that all deps are fitting. Alternatively, you can install the major dependecies by hand:

```
- python 3.6
- matplotlib 3.3.4
- tensorflow 2.4.1
- pyronn 0.1.0
```
Then install the v0.1.0 release with

`pip install https://github.com/maxrohleder/win-pyronn/releases/download/v0.1.0/pyronn_layers-0.1.0-cp36-cp36m-win_amd64.whl`

## A step-by-step guide

As the [custom_ops readme](https://github.com/tensorflow/custom-op) offers very limited support for building a custom
layer on windows, I decided to create my own and thoroughly document the build process of
the [pyroNN layers](https://github.com/csyben/PYRO-NN-Layers).

I spent a lot of time on this issue, so here are the exact steps I used to compile the framework.

### A step-by-step guide

Make sure to use one of the tested combinations of build tools and dependencies listed [here](https://www.tensorflow.org/install/source_windows?hl=en#gpu).

```md
Expand All @@ -22,9 +47,9 @@ ________________________________________________________________________________
1. download bazel 3.1.0, unzip it to some folder and add it to path (its just one executable)
https://github.com/bazelbuild/bazel/releases/tag/3.1.0

2. install cuda 10.1 and cudnn 7.6
2. install cuda 10.1 and cudnn 7.6.5
https://developer.nvidia.com/cuda-10.1-download-archive-base
https://developer.nvidia.com/rdp/cudnn-archive <-- (have to make an nvidia dev account)
https://developer.nvidia.com/rdp/cudnn-archive <-- (have to make an nvidia dev account [direct link](https://developer.nvidia.com/compute/machine-learning/cudnn/secure/7.6.5.32/Production/10.1_20191031/cudnn-10.1-windows10-x64-v7.6.5.32.zip))

3. unpack cudnn into the cuda folder
https://medium.com/vitrox-publication/deep-learning-frameworks-tensorflow-build-from-source-on-windows-python-c-cpu-gpu-d3aa4d0772d8
Expand Down

0 comments on commit 3d5b520

Please sign in to comment.