From bcfd4fd409c3e2c32eb085151f9f87409b549bce Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Mon, 12 Feb 2018 18:38:37 +0100 Subject: [PATCH] Update for r1.5 --- README.md | 2 +- bin/run-tc-ldc93s1.sh | 2 +- native_client/BUILD | 2 +- native_client/README.md | 2 +- native_client/deepspeech.cc | 2 +- requirements.txt | 2 +- taskcluster/darwin-amd64-cpu-aot_prod-opt.yml | 4 ++-- taskcluster/darwin-amd64-cpu-opt.yml | 4 ++-- taskcluster/linux-amd64-cpu-aot_prod-opt.yml | 4 ++-- taskcluster/linux-amd64-cpu-aot_test-opt.yml | 4 ++-- taskcluster/linux-amd64-cpu-opt.yml | 4 ++-- taskcluster/linux-amd64-ctc-opt.yml | 4 ++-- taskcluster/linux-amd64-gpu-opt.yml | 4 ++-- taskcluster/linux-rpi3-cpu-aot_prod-opt.yml | 4 ++-- taskcluster/linux-rpi3-cpu-opt.yml | 4 ++-- taskcluster/node-package.yml | 4 ++-- tc-tests-utils.sh | 7 +------ 17 files changed, 27 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 0d843492..766a29c9 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ If you have a capable (Nvidia, at least 8GB of VRAM) GPU, it is highly recommend ```bash pip uninstall tensorflow -pip install 'tensorflow-gpu==1.4.0' +pip install 'tensorflow-gpu==1.5.0' ``` ### Common Voice training data diff --git a/bin/run-tc-ldc93s1.sh b/bin/run-tc-ldc93s1.sh index ad15bf50..a164546c 100755 --- a/bin/run-tc-ldc93s1.sh +++ b/bin/run-tc-ldc93s1.sh @@ -17,4 +17,4 @@ python -u DeepSpeech.py \ --n_hidden 494 --epoch 75 --random_seed 4567 --default_stddev 0.046875 \ --max_to_keep 1 --checkpoint_dir '/tmp/ckpt' --checkpoint_secs 0 \ --learning_rate 0.001 --dropout_rate 0.05 --export_dir "/tmp/train" \ - --use_seq_length False --decoder_library_path "/tmp/ds/libctc_decoder_with_kenlm.so" + --nouse_seq_length --decoder_library_path "/tmp/ds/libctc_decoder_with_kenlm.so" diff --git a/native_client/BUILD b/native_client/BUILD index 09bd3d24..a64ff2be 100644 --- a/native_client/BUILD +++ b/native_client/BUILD @@ -83,7 +83,7 @@ tf_cc_shared_object( "//tensorflow/core/kernels:tensor_array_ops", # Placeholder, TensorArrayV3 "//tensorflow/core/kernels:control_flow_ops", # Enter "//tensorflow/core/kernels:ctc_ops", # CTCBeamSearchDecoder - ### Needed by production model produced without "--use_seq_length False" + ### Needed by production model produced without "--nouse_seq_length "//tensorflow/core/kernels:logging_ops", # Assert "//tensorflow/core/kernels:reverse_sequence_op", # ReverseSequence # Classic deps diff --git a/native_client/README.md b/native_client/README.md index dd38a157..3e41ee9b 100644 --- a/native_client/README.md +++ b/native_client/README.md @@ -85,7 +85,7 @@ make deepspeech ## Building with AOT model First, please note that this is still experimental. AOT model relies on TensorFlow's [AOT tfcompile](https://www.tensorflow.org/performance/xla/tfcompile) tooling. It takes a protocol buffer file graph as input, and produces a .so library that one can call from C++ code. -To experiment, you will need to build TensorFlow from [github.com/mozilla/tensorflow r1.4 branch](https://github.com/mozilla/tensorflow/tree/r1.4). Follow TensorFlow's documentation for the configuration of your system. +To experiment, you will need to build TensorFlow from [github.com/mozilla/tensorflow r1.5 branch](https://github.com/mozilla/tensorflow/tree/r1.5). Follow TensorFlow's documentation for the configuration of your system. When building, you will have to add some extra parameter and targets. Bazel defines: diff --git a/native_client/deepspeech.cc b/native_client/deepspeech.cc index 44ee4800..02c18ecf 100644 --- a/native_client/deepspeech.cc +++ b/native_client/deepspeech.cc @@ -231,7 +231,7 @@ Model::infer(float* aMfcc, int aNFrames, int aFrameLen) Eigen::ThreadPool tp(2); // Size the thread pool as appropriate. Eigen::ThreadPoolDevice device(&tp, tp.NumThreads()); - nativeModel nm(nativeModel::AllocMode::RESULTS_AND_TEMPS_ONLY); + nativeModel nm(nativeModel::AllocMode::RESULTS_PROFILES_AND_TEMPS_ONLY); nm.set_thread_pool(&device); for (int ot = 0; ot < timesteps; ot += DS_MODEL_TIMESTEPS) { diff --git a/requirements.txt b/requirements.txt index aee2e327..b2b51d5d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,7 @@ pandas progressbar2 python-utils -tensorflow == 1.4.0 +tensorflow == 1.5.0 numpy matplotlib scipy diff --git a/taskcluster/darwin-amd64-cpu-aot_prod-opt.yml b/taskcluster/darwin-amd64-cpu-aot_prod-opt.yml index 25340f7f..f5210024 100644 --- a/taskcluster/darwin-amd64-cpu-aot_prod-opt.yml +++ b/taskcluster/darwin-amd64-cpu-aot_prod-opt.yml @@ -4,8 +4,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.osx_aot" - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.${event.head.sha}.osx_aot" - "index.project.deepspeech.deepspeech.native_client.osx_aot.${event.head.sha}" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.osx/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.osx/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.osx/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.osx/artifacts/public/summarize_graph" scripts: build: "taskcluster/host-build.sh --aot" package: "taskcluster/package.sh" diff --git a/taskcluster/darwin-amd64-cpu-opt.yml b/taskcluster/darwin-amd64-cpu-opt.yml index 74e0c4b5..0c3f3983 100644 --- a/taskcluster/darwin-amd64-cpu-opt.yml +++ b/taskcluster/darwin-amd64-cpu-opt.yml @@ -6,8 +6,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.osx.${event.head.sha}" - "notify.irc-channel.${notifications.irc}.on-exception" - "notify.irc-channel.${notifications.irc}.on-failed" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.osx/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.osx/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.osx/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.osx/artifacts/public/summarize_graph" scripts: build: "taskcluster/host-build.sh" package: "taskcluster/package.sh" diff --git a/taskcluster/linux-amd64-cpu-aot_prod-opt.yml b/taskcluster/linux-amd64-cpu-aot_prod-opt.yml index 00b73528..8e74c4de 100644 --- a/taskcluster/linux-amd64-cpu-aot_prod-opt.yml +++ b/taskcluster/linux-amd64-cpu-aot_prod-opt.yml @@ -4,8 +4,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.cpu_aot" - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.${event.head.sha}.cpu_aot" - "index.project.deepspeech.deepspeech.native_client.cpu_aot.${event.head.sha}" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/summarize_graph" system_setup: > ${nodejs.packages.prep_6} && apt-get -qq update && apt-get -qq -y install nodejs python-yaml && diff --git a/taskcluster/linux-amd64-cpu-aot_test-opt.yml b/taskcluster/linux-amd64-cpu-aot_test-opt.yml index b95354aa..e3abd81f 100644 --- a/taskcluster/linux-amd64-cpu-aot_test-opt.yml +++ b/taskcluster/linux-amd64-cpu-aot_test-opt.yml @@ -6,8 +6,8 @@ build: template_file: linux-opt-base.tyml dependencies: - "test-training_upstream-linux-amd64-py27-opt" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/summarize_graph" system_setup: > ${nodejs.packages.prep_6} && apt-get -qq update && apt-get -qq -y install nodejs python-yaml && diff --git a/taskcluster/linux-amd64-cpu-opt.yml b/taskcluster/linux-amd64-cpu-opt.yml index 6aabba35..bcc25b04 100644 --- a/taskcluster/linux-amd64-cpu-opt.yml +++ b/taskcluster/linux-amd64-cpu-opt.yml @@ -13,8 +13,8 @@ build: system_config: > ${swig.patch_nodejs.linux} - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/summarize_graph" scripts: build: "taskcluster/host-build.sh" package: "taskcluster/package.sh" diff --git a/taskcluster/linux-amd64-ctc-opt.yml b/taskcluster/linux-amd64-ctc-opt.yml index 899d7a1f..281d06cc 100644 --- a/taskcluster/linux-amd64-ctc-opt.yml +++ b/taskcluster/linux-amd64-ctc-opt.yml @@ -4,8 +4,8 @@ build: - "pull_request.synchronize" - "pull_request.reopened" template_file: linux-opt-base.tyml - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/summarize_graph" scripts: build: 'taskcluster/decoder-build.sh' package: 'taskcluster/decoder-package.sh' diff --git a/taskcluster/linux-amd64-gpu-opt.yml b/taskcluster/linux-amd64-gpu-opt.yml index 3328be2c..ae4d2446 100644 --- a/taskcluster/linux-amd64-gpu-opt.yml +++ b/taskcluster/linux-amd64-gpu-opt.yml @@ -11,8 +11,8 @@ build: system_config: > ${swig.patch_nodejs.linux} - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.gpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.gpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.gpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.gpu/artifacts/public/summarize_graph" maxRunTime: 14400 scripts: build: "taskcluster/cuda-build.sh" diff --git a/taskcluster/linux-rpi3-cpu-aot_prod-opt.yml b/taskcluster/linux-rpi3-cpu-aot_prod-opt.yml index 84517be9..424c7fc2 100644 --- a/taskcluster/linux-rpi3-cpu-aot_prod-opt.yml +++ b/taskcluster/linux-rpi3-cpu-aot_prod-opt.yml @@ -4,8 +4,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.arm_aot" - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.${event.head.sha}.arm_aot" - "index.project.deepspeech.deepspeech.native_client.arm_aot.${event.head.sha}" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.arm/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.arm/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/summarize_graph" ## multistrap 2.2.0-ubuntu1 is broken in 14.04: https://bugs.launchpad.net/ubuntu/+source/multistrap/+bug/1313787 system_setup: > diff --git a/taskcluster/linux-rpi3-cpu-opt.yml b/taskcluster/linux-rpi3-cpu-opt.yml index 8c6494d4..16f9ac2e 100644 --- a/taskcluster/linux-rpi3-cpu-opt.yml +++ b/taskcluster/linux-rpi3-cpu-opt.yml @@ -4,8 +4,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.arm" - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.${event.head.sha}.arm" - "index.project.deepspeech.deepspeech.native_client.arm.${event.head.sha}" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.arm/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.arm/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/summarize_graph" ## multistrap 2.2.0-ubuntu1 is broken in 14.04: https://bugs.launchpad.net/ubuntu/+source/multistrap/+bug/1313787 system_setup: > diff --git a/taskcluster/node-package.yml b/taskcluster/node-package.yml index 10e6c4d2..b1c95949 100644 --- a/taskcluster/node-package.yml +++ b/taskcluster/node-package.yml @@ -14,8 +14,8 @@ build: system_config: > ${swig.patch_nodejs.linux} - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.4.725825298e7654f2f799c96cb5a65c5114361b31.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.5.723fb3984980c994579c055736688f693e38ee27.cpu/artifacts/public/summarize_graph" scripts: build: "taskcluster/node-build.sh" package: "taskcluster/node-package.sh" diff --git a/tc-tests-utils.sh b/tc-tests-utils.sh index cdeec761..291d4d3c 100755 --- a/tc-tests-utils.sh +++ b/tc-tests-utils.sh @@ -32,10 +32,7 @@ export EXTRA_AOT_CFLAGS="" export EXTRA_AOT_LDFLAGS="" export EXTRA_AOT_LIBS="-ldeepspeech_model" -# FIXME: -# Previously, with r1.3, we could use timesteps of 64 -# With r1.4 it seems to eat too much resources at tfcompile step -export BAZEL_AOT_BUILD_FLAGS="--define=DS_NATIVE_MODEL=1 --define=DS_MODEL_TIMESTEPS=16" +export BAZEL_AOT_BUILD_FLAGS="--define=DS_NATIVE_MODEL=1 --define=DS_MODEL_TIMESTEPS=64" export BAZEL_AOT_TARGETS=" //native_client:libdeepspeech_model.so " @@ -44,8 +41,6 @@ model_source=${DEEPSPEECH_TEST_MODEL} model_name=$(basename "${model_source}") SUPPORTED_PYTHON_VERSIONS=${SUPPORTED_PYTHON_VERSIONS:-2.7.13 3.4.6 3.5.3 3.6.2} -# 7.10.0 and 8.0.0 targets fails to build -# > ../deepspeech_wrap.cxx:966:23: error: 'WeakCallbackData' in namespace 'v8' does not name a type SUPPORTED_NODEJS_VERSIONS=${SUPPORTED_NODEJS_VERSIONS:-4.8.6 5.12.0 6.12.0 7.10.1 8.9.1 9.2.0} # This verify exact inference result