티스토리 뷰
tensorflow-custom-op
- this post covers
- set up the environment for developing custom op using TF-cpu
- build custom op using TF-cpu into package
- extract the package
- next post covers
- set up the environment for developing custom op using TF-gpu
- build custom op using TF-gpu into package
- environment
- Windows / 10 Pro
- Git
- reference
preparation
- sign up for Docker Hub
- install Docker Desktop for Windows from here
- execute the installer and follow default options
- execute the command prompt
- type docker and now you can check out whether the docker command works
- execute Docker Desktop
- check out whether it is in the running state
- type "docker pull tensorflow/tensorflow:custom-op" to download docker image
- now you are ready to create container
- type "docker run -it tensorflow/tensorflow:custom-op /bin/bash"
- this will create container and enter to it with bash
build-package
- clone the "custom-op" repository in proper directory
- I cloned it in the home directory with "cd ~"
- and change directory into the cloned folder
- type "./configure.sh"
- in this post, we gotta learn about custom op with cpu
- type "bazel build build_pip_pkg" and "bazel-bin/build_pip_pkg artifacts"
- this will create python package from default code of cloned repository
install-pacakge
- you can check out the package in "/artifacts"
- this package only can be installed in linux system
- type "pip install [package-name].whl"
- you can check out in the interpreter whether the package is successfully installed
extract-package
- remember path of the pacakge
- in my case, it was "/root/custom-op/artifacts/[package-name].whl"
- execute another command prompt in host, which is Windows
- type "docker cp [src-path] [dst-path]"
- in my case, it was "docker cp 7dbcce24ce68:/root/custom-op/artifacts/tensorflow_zero_out-0.0.1-cp27-cp27mu-linux_x86_64.whl d:/_downloads"
- you can check out the package in file explorer, too
'Computer Science > Artificial Intelligence' 카테고리의 다른 글
tensorflow-in-windows (2/2) (0) | 2019.06.07 |
---|---|
tensorflow-in-windows (1/2) (0) | 2019.05.31 |
Introduction to A.I. (5/5) (0) | 2018.11.01 |
Introduction to A.I. (4/5) (0) | 2018.10.26 |
Introduction to A.I. (3/5) (0) | 2018.10.19 |
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- shader
- ATOM
- WindowAPI
- Python
- Hashtable
- lib
- Anaconda
- CUDA
- vscode
- PopeTV
- DirectX
- tensorflow
- unreal
- cuDNN
- windows
- NOX
- A.I.
- csharp
- C/C++
- Slack
- pclaf
- visualstudio
- JIT
- git
- dll
- CAFFE
- Docker
- visual-studio
- unity
- Game
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함