From d2ad0e7f5a7416ae833f0e803fdaf606995af140 Mon Sep 17 00:00:00 2001 From: sugarme Date: Tue, 3 Nov 2020 00:26:25 +1100 Subject: [PATCH] Updated CHANGELOG, README and scripts for v0.3.0 --- CHANGELOG.md | 6 ++++++ README.md | 16 ++++++++-------- setup-cpu.sh | 4 ++-- setup-gpu.sh | 4 ++-- setup.sh | 12 ++++++------ 5 files changed, 24 insertions(+), 18 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 81a16ad..974388e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,3 +41,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Added drawing image label at `example/yolo` example - Added some example images and README files for `example/yolo` and `example/neural-style-transfer` + +## [0.3.0] + +### Changed +- Updated to Pytorch C++ APIs v1.7.0 +- Switched back to `lib.AtoAddParametersOld` as the `ato_add_parameters` has not been implemented correctly. Using the updated API will cause optimizer stops working. diff --git a/README.md b/README.md index d05ea1d..ad57dfe 100644 --- a/README.md +++ b/README.md @@ -5,32 +5,32 @@ - **GoTch** is a C++ Libtorch Go binding for developing and implementing deep learning projects in Go. - This package is to create a thin wrapper of Libtorch to make use of its tensor APIs and CUDA support while implementing as much idiomatic Go as possible. -- There are about **1129** auto-generated tensor APIs. +- There are about **1404** auto-generated tensor APIs. ## Dependencies -- **Libtorch** C++ v1.5.0 library of [Pytorch](https://pytorch.org/) +- **Libtorch** C++ v1.7.0 library of [Pytorch](https://pytorch.org/) ## Installation - **CPU** - Default values: `LIBTORCH_VER=1.5.1` and `GOTCH_VER=v0.1.7` + Default values: `LIBTORCH_VER=1.7.0` and `GOTCH_VER=v0.3.0` ```bash - go get -u github.com/sugarme/gotch@v0.1.7 - bash ${GOPATH}/pkg/mod/github.com/sugarme/gotch@v0.1.7/setup-cpu.sh + go get -u github.com/sugarme/gotch@v0.3.0 + bash ${GOPATH}/pkg/mod/github.com/sugarme/gotch@v0.3.0/setup-cpu.sh ``` - **GPU** - Default values: `LIBTORCH_VER=1.5.1`, `CUDA_VER=10.1` and `GOTCH_VER=v0.1.7` + Default values: `LIBTORCH_VER=1.7.0`, `CUDA_VER=10.1` and `GOTCH_VER=v0.3.0` ```bash - go get -u github.com/sugarme/gotch@v0.1.7 - bash ${GOPATH}/pkg/mod/github.com/sugarme/gotch@v0.1.7/setup-gpu.sh + go get -u github.com/sugarme/gotch@v0.3.0 + bash ${GOPATH}/pkg/mod/github.com/sugarme/gotch@v0.3.0/setup-gpu.sh ``` diff --git a/setup-cpu.sh b/setup-cpu.sh index 101dcfe..a3866b7 100755 --- a/setup-cpu.sh +++ b/setup-cpu.sh @@ -1,8 +1,8 @@ #!/bin/bash # Env -GOTCH_VERSION="${GOTCH_VER:-v0.2.0}" -LIBTORCH_VERSION="${LIBTORCH_VER:-1.5.1}" +GOTCH_VERSION="${GOTCH_VER:-v0.3.0}" +LIBTORCH_VERSION="${LIBTORCH_VER:-1.7.0}" GOTCH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION" LIBTORCH="$GOPATH/pkg/mod/github.com/sugarme/gotch@$GOTCH_VERSION/libtch/libtorch" diff --git a/setup-gpu.sh b/setup-gpu.sh index 72537ee..2355db3 100755 --- a/setup-gpu.sh +++ b/setup-gpu.sh @@ -1,7 +1,7 @@ #!/bin/bash -GOTCH_VERSION="${GOTCH_VER:-v0.2.0}" -LIBTORCH_VERSION="${LIBTORCH_VER:-1.5.1}" +GOTCH_VERSION="${GOTCH_VER:-v0.3.0}" +LIBTORCH_VERSION="${LIBTORCH_VER:-1.7.0}" CUDA_VERSION="${CUDA_VER:-10.1}" CU_VERSION="${CUDA_VERSION//./}" diff --git a/setup.sh b/setup.sh index 96f735b..97db2b7 100755 --- a/setup.sh +++ b/setup.sh @@ -1,15 +1,15 @@ #!/bin/bash -GOTCH_VERSION="${GOTCH_VER:-v0.2.1}" -LIBTORCH_VERSION="${LIBTORCH_VER:-1.7.0}" -CUDA_VERSION="${CUDA_VER:-10.1}" -CU_VERSION="${CUDA_VERSION//./}" +export GOTCH_VERSION="${GOTCH_VER:-v0.3.0}" +export LIBTORCH_VERSION="${LIBTORCH_VER:-1.7.0}" +export CUDA_VERSION="${CUDA_VER:-10.1}" +export CU_VERSION="${CUDA_VERSION//./}" export GOTCH="$HOME/projects/sugarme/gotch" export LIBTORCH="$HOME/projects/sugarme/gotch/libtch/libtorch" export LIBRARY_PATH="$LIBTORCH/lib" -export CPATH="$CPATH:$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc/api/include" -export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$LIBTORCH/lib:/usr/lib64-nvidia:/usr/local/cuda-${CUDA_VERSION}/lib64" +export CPATH="$LIBTORCH/lib:$LIBTORCH/include:$LIBTORCH/include/torch/csrc/api/include" +export LD_LIBRARY_PATH="$LIBTORCH/lib:/usr/lib64-nvidia:/usr/local/cuda-${CUDA_VERSION}/lib64" sudo rm -rf $LIBTORCH sudo mkdir -p $LIBTORCH