delta-ml / delta Goto Github PK
View Code? Open in Web Editor NEWDELTA is a deep learning based natural language and speech processing platform.
Home Page: https://delta-didi.readthedocs.io/
License: Apache License 2.0
DELTA is a deep learning based natural language and speech processing platform.
Home Page: https://delta-didi.readthedocs.io/
License: Apache License 2.0
ERROR:
tensorflow.python.framework.errors_impl.NotFoundError: /home/delta/delta/layers/ops/x_ops.so: cannot open shared object file: No such file or directory
3 smaller issues:
When remove_last_nonlinearity: true
in config file, there won't be any dropout in embedding layers. This breaks consistency with older models.
According to researches, dropout in embedding layers (or the whole network) has no benefit for embedding learning. So we'll remove them.
Test Adam + L2.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
Support RESTfull API same to TF-Serving, using golang.
Describe alternatives you've considered
Compile go bins under docker.
using go deps to organize packages.
Additional context
SSLError(MaxRetryError('HTTPSConnectionPool(host='repo.anaconda.com', port=443): Max retries exceeded with url: /pkgs/main/noarch/repodata.json.bz2 (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')",),))',),)
这个怎么解决
Traceback (most recent call last):
File "local/generate_mock_data.py", line 19, in
from delta.data.utils.test_utils import mock_a_text_file
File "/home/xxx/study/delta/delta/data/utils/init.py", line 17, in
from delta.data.utils.common_utils import *
File "/home/xxx/study/delta/delta/data/utils/common_utils.py", line 26, in
from delta.data.preprocess.text_ops import tokenize_label
File "/home/xxx/study/delta/delta/data/preprocess/text_ops.py", line 22, in
from delta.layers.ops import py_x_ops
File "/home/xxx/study/delta/delta/layers/init.py", line 27, in
from delta.layers.common_layers import *
File "/home/xxx/study/delta/delta/layers/common_layers.py", line 22, in
from delta.data.feat import speech_ops
File "/home/xxx/study/delta/delta/data/feat/init.py", line 17, in
from delta.data.feat import speech_ops
File "/home/xxx/study/delta/delta/data/feat/speech_ops.py", line 25, in
from delta.layers.ops import py_x_ops
File "/home/xxx/study/delta/delta/layers/ops/py_x_ops.py", line 27, in
tf.compat.v1.resource_loader.get_path_to_datafile('x_ops.so'))
File "/home/xxx/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/framework/load_library.py", line 61, in load_op_library
lib_handle = py_tf.TF_LoadLibrary(library_filename)
tensorflow.python.framework.errors_impl.NotFoundError: /home/xxx/study/delta/delta/layers/ops/x_ops.so: undefined symbol: _ZN10tensorflow8str_util9LowercaseEN4absl11string_viewE
Describe the bug
When trying to run an evaluation run with the iemocap example after training a model it fails with:
Traceback (most recent call last):
File "../../delta/delta/main.py", line 111, in <module>
app.run(main)
File "/home/david175/miniconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/home/david175/miniconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "../../delta/delta/main.py", line 81, in main
solver.eval()
File "/home/david175/project/delta/delta/utils/solver/emotion_solver.py", line 132, in eval
self.model_fn(mode=utils.EVAL)
File "/home/david175/project/delta/delta/utils/solver/asr_solver.py", line 193, in model_fn
self.model.load_weights(str(model_path))
File "/home/david175/miniconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/keras/engine/training.py", line 162, in load_weights
return super(Model, self).load_weights(filepath, by_name)
File "/home/david175/miniconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/keras/engine/network.py", line 1424, in load_weights
saving.load_weights_from_hdf5_group(f, self.layers)
File "/home/david175/miniconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/keras/saving/hdf5_format.py", line 737, in load_weights_from_hdf5_group
' layers.')
ValueError: You are trying to load a weight file containing 3 layers into a model with 0 layers.
To Reproduce
Requires full installation of delta & iemocap dataset. Steps to reproduce the behavior:
egs/iemocap/emo/v1/run.sh
egs/iemocap/emo/v1/conf/emo-keras-blstm.yml
egs/iemocap/emo/v1
./run.sh
Expected behavior
The evaluation runs without errors.
Additional Information
Tried it with keras 2.2.4
and 2.1.0
. Both produce the same error.
你好,我已经训练并导出了cnn_dailymail例子的saved_model模型,但我不知道如何部署我的模型并对外提供服务。我试图在tf-serving docker上部署,命令是docker run -d --name tf-serving -v /root/delta:/models/delta -e MODEL_NAME=delta tensorflow/serving:1.14.0,但报错。我的宿主机/root/delta目录下有我导出的saved_model模型,启动容器后查看日志,显示:tensorflow_serving/util/retrier.cc:37] Loading servable: {name: delta version: 1} failed: Not found: Op type not registered 'SentenceToIds' in binary running on hi2. Make sure the Op and Kernel are registered in the binary running in this process. Note that if you are loading a saved graph which used ops from tf.contrib, accessing (e.g.) tf.contrib.resampler
should be done before importing the graph, as contrib ops are lazily registered when the module is first accessed.
此外,请详细帮我讲解一下如果这个text summarization例子部署成功,我该如何调用它为我返回文本摘要,上传什么参数,返回给我什么信息,部署时的model.yaml该怎么写,多谢!
Describe the bug
The layout of the buffer is [T, CxD].
Expected behavior
The layout of the buffer is [T, DxC].
[T, D, C]
Describe the bug
A clear and concise description of what the bug is.
in tf1.12, run python main.py --cmd train --config ../egs/atis2/nlu_joint/v1/config/nlu_joint.yml ,AttributeError: 'JointBilstmCrfModel' object has no attribute '_trainable_weights'
To Reproduce
Steps to reproduce the behavior:
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
SATT
Describe the solution you'd like
Describe alternatives you've considered
Additional context
Hello,
I am trying to run the seq2seq model available in the example section. Model can detect all the gpus (3) as shown here:
2019-11-28 15:26:55.790478: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1763] Adding visible gpu devices: 0, 1, 2
2019-11-28 15:26:55.790786: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1181] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-11-28 15:26:55.790800: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1187] 0 1 2
2019-11-28 15:26:55.790808: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 0: N Y Y
2019-11-28 15:26:55.790813: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 1: Y N Y
2019-11-28 15:26:55.790819: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1200] 2: Y Y N
In spite of that model consumes only memory of 1 gpu as shown here:
+-----------------------------------------------------------------------------+
| Processes: GPU Memory |
| GPU PID Type Process name Usage |
|=============================================================================|
| 0 357088 C python3 23427MiB |
| 1 357088 C python3 163MiB |
| 2 357088 C python3 163MiB |
+-----------------------------------------------------------------------------+
Please let me know, where should I do changes, to use full GPU memory usage.
Thanks in advance
Describe the bug
from delta.layers.base_layer import Layer
will raise error:
"Registering two gradient with name 'BlockLSTM'!
caused by from delta.layers.recurrent import RnnAttentionEncoder
To Reproduce
under delta/delta/models
python autoencoder_model_test.py
Screenshots
Traceback (most recent call last):
File "autoencoder_model_test.py", line 35, in setUp
import_all_modules_for_register_v2()
File "/workbase/delta/delta/utils/register.py", line 181, in import_all_modules_for_register_v2
importlib.import_module(full_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/workbase/delta/delta/models/autoencoder_model.py", line 25, in <module>
from delta.layers.base_layer import Layer
File "/workbase/delta/delta/layers/__init__.py", line 19, in <module>
from delta.layers.recurrent import RnnAttentionEncoder
File "/workbase/delta/delta/layers/recurrent.py", line 23, in <module>
from tensorflow.contrib import seq2seq
File "/root/.local/lib/python3.6/site-packages/tensorflow/contrib/__init__.py", line 37, in <module>
from tensorflow.contrib import cudnn_rnn
File "/root/.local/lib/python3.6/site-packages/tensorflow/contrib/cudnn_rnn/__init__.py", line 38, in <module>
from tensorflow.contrib.cudnn_rnn.python.layers import *
File "/root/.local/lib/python3.6/site-packages/tensorflow/contrib/cudnn_rnn/python/layers/__init__.py", line 23, in <module>
from tensorflow.contrib.cudnn_rnn.python.layers.cudnn_rnn import *
File "/root/.local/lib/python3.6/site-packages/tensorflow/contrib/cudnn_rnn/python/layers/cudnn_rnn.py", line 20, in <module>
from tensorflow.contrib.cudnn_rnn.python.ops import cudnn_rnn_ops
File "/root/.local/lib/python3.6/site-packages/tensorflow/contrib/cudnn_rnn/python/ops/cudnn_rnn_ops.py", line 22, in <module>
from tensorflow.contrib.rnn.python.ops import lstm_ops
File "/root/.local/lib/python3.6/site-packages/tensorflow/contrib/rnn/__init__.py", line 91, in <module>
from tensorflow.contrib.rnn.python.ops.lstm_ops import *
File "/root/.local/lib/python3.6/site-packages/tensorflow/contrib/rnn/python/ops/lstm_ops.py", line 298, in <module>
@ops.RegisterGradient("BlockLSTM")
File "/root/.local/lib/python3.6/site-packages/tensorflow_core/python/framework/ops.py", line 2489, in __call__
_gradient_registry.register(f, self._op_type)
File "/root/.local/lib/python3.6/site-packages/tensorflow_core/python/framework/registry.py", line 61, in register
(self._name, name, function_name, filename, line_number))
KeyError: "Registering two gradient with name 'BlockLSTM'! (Previous registration was in register /root/.local/lib/python3.6/site-packages/tensorflow_core/python/framework/registry.py:66)"
----------------------------------------------------------------------
Ran 2 tests in 0.216s
FAILED (errors=1)
Additional context
test under delta docker
Is your feature request related to a problem? Please describe.
speaker with multi class task, log metrics error on evaluation.
Describe the solution you'd like
do not log metrics which is for binary class.
Describe alternatives you've considered
N/A
Additional context
N/A
Is your feature request related to a problem? Please describe.
Unify delta and deltann docker image, using one image.
Supoort gpu and cpu.
Compile and install tensorflow from source.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
common_layers.py
Describe the solution you'd like
For common_layers.py
add unit test,
and extract common layer from speaker_cls_rawmodel.py
into common_layers.py
.
Describe alternatives you've considered
N/A
Additional context
N/A
Hi all, thank you for open this project.
I want to run the deployment.
The readme says:
dpl/gadapter
to convert model to other deployment model.But I didn't find any scripts in the folder.
Could you show the details? Thx!
replace this cmd steps/make_fbank_pitch.sh --cmd run.pl --nj 2 --write_utt2num_frames true data/test exp/make_fbank/test fbank
by ops
Originally posted by @zh794390558 in #52 (comment)
ops:
https://github.com/didi/delta/tree/master/delta/layers/ops
feat:
https://github.com/didi/delta/tree/master/delta/data/feat
output:
put make_fbank_pitch.sh
into delta/utils
reference:
https://github.com/espnet/espnet/tree/master/espnet/transform
We should add more documentation for the codebase. We will start from the tutorial for all the benchmark we have experimented https://github.com/didi/delta#benchmarks.
A tutorial on how to reproduce the results from scratch for each model is necessary. Jupyter notebook is preferred, but markdown is acceptable too.
def apply_local_cmvn(feats, epsilon=1e-9)
does not have unit test.
Describe the solution you'd like
add unit test.
Describe alternatives you've considered
N/A
Additional context
N/A
['solver']['optimizer']['loss'] = string, [string], dict, [dict]
Originally posted by @zh794390558 in https://github.com/didi/delta/pull/40/files
安装full version 进行到最后时出现上述报错,看了一下自己的系统版本时ubuntu16.04 gcc版本是5.4.0
请问需要升级到哪个版本吗
Describe the bug
tools/install/install-deltann.sh
logging successful when error.
To Reproduce
pushd tools/install ; bash install-deltann.sh
Expected behavior
Give real log.
Screenshots
N/A
Desktop (please complete the following information):
N/A
Smartphone (please complete the following information):
N/A
Additional context
N/A
Describe the solution you'd like
ATT.
Describe alternatives you've considered
N/A
Additional context
N/A
Describe the solution you'd like
update speaker model and data pipeline, support large margin softmax.
Describe alternatives you've considered
Additional context
Is your feature request related to a problem? Please describe.
using root as default for docker image
Hello, thank you for the toolkit
Am I wrong to say that there are no example scripts to use Delta toolkit for audio applications?
Without an example script, it is really difficult to test your toolkit.
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like
large batch size
restore model from latest or specific checkpoint.
refactor solver to using by asr and emo.
blank index transform and doc addition.
mini_an4 integration test.
filter input & output length. espnet utils
lookup table to convert infer token id to token, and dump as kaldi format.
export saved model
Describe alternatives you've considered
N/A
Additional context
N/A
what's the meaning of each option in the .yml file,Are there any articles devoted to this?
Describe the solution you'd like
Moving def arcface_loss
to utils and support weights
from outer and create inner.
And also add unit test.
Describe alternatives you've considered
N/A
Additional context
N/A
Building in Docker Cloud's infrastructure...
Cloning into '.'...
Warning: Permanently added the RSA host key for IP address '140.82.113.4' to the list of known hosts.
fatal: no submodule mapping found in .gitmodules for path 'egs/conll2003/pretrain/v1/local/bilm'
please ensure the correct public key is added to the list of trusted keys for this repository and the remote branch exists. (128)
refs:
https://docs.docker.com/docker-hub/builds/link-source/
docker/hub-feedback#416
docker/hub-feedback#213
docker/hub-feedback#633
mfcc[done]
make_mfcc.sh[done]
compute-cmvn-stats[done]
apply-cmvn[done]
make_stft.sh[done]
One Entry Point Like espnet transform
copy-feat[done]
extract spec and phase from wav[done]
convert spec and phase to wav[done]
pitch
plp
docs for the interface
in delta/utils/solver/raw_solver.py 109-110
if "{}_model_path".format(mode) in self.config["solver"]["saver"]:
model_path = self.config["saver"]["{}_model_path".format(mode)]
the second line should be
model_path = self.config["solver"]["saver"]["{}_model_path".format(mode)]
dump lib, *.h to dpl/output dir
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
First structure: type=Tensor str=Tensor("train/cond_1/zeros:0", shape=(), dtype=float32)
Second structure: type=IndexedSlices str=IndexedSlices(indices=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape_1:0", shape=(?,), dtype=int32), values=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape:0", shape=(?, 300), dtype=float32), dense_shape=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Const:0", shape=(2,), dtype=int32))
More specifically: Substructure "type=IndexedSlices str=IndexedSlices(indices=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape_1:0", shape=(?,), dtype=int32), values=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape:0", shape=(?, 300), dtype=float32), dense_shape=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Const:0", shape=(2,), dtype=int32))" is a sequence, while substructure "type=Tensor str=Tensor("train/cond_1/zeros:0", shape=(), dtype=float32)" is not
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2001, in cond
nest.assert_same_structure(orig_res_t, orig_res_f, expand_composites=True)
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/util/nest.py", line 304, in assert_same_structure
% (str(e), str1, str2))
ValueError: The two structures don't have the same nested structure.
First structure: type=Tensor str=Tensor("train/cond_1/zeros:0", shape=(), dtype=float32)
Second structure: type=IndexedSlices str=IndexedSlices(indices=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape_1:0", shape=(?,), dtype=int32), values=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape:0", shape=(?, 300), dtype=float32), dense_shape=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Const:0", shape=(2,), dtype=int32))
More specifically: Substructure "type=IndexedSlices str=IndexedSlices(indices=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape_1:0", shape=(?,), dtype=int32), values=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape:0", shape=(?, 300), dtype=float32), dense_shape=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Const:0", shape=(2,), dtype=int32))" is a sequence, while substructure "type=Tensor str=Tensor("train/cond_1/zeros:0", shape=(), dtype=float32)" is not
Entire first structure:
.
Entire second structure:
.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/gallup/study/nlp/photon/main.py", line 114, in
app.run(main)
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/absl/app.py", line 300, in run
_run_main(main, args)
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/absl/app.py", line 251, in _run_main
sys.exit(main(argv))
File "/home/gallup/study/nlp/photon/main.py", line 82, in main
solver.train_and_eval()
File "/home/gallup/study/nlp/photon/utils/solver/raw_solver.py", line 420, in train_and_eval
global_step)
File "/home/gallup/study/nlp/photon/utils/solver/base_solver.py", line 339, in get_train_op
global_step)
File "/home/gallup/study/nlp/photon/utils/solver/base_solver.py", line 290, in get_apply_gradients_op
grads_and_vars = self.clip_gradients(grads_and_vars, global_norm, multitask)
File "/home/gallup/study/nlp/photon/utils/solver/base_solver.py", line 269, in clip_gradients
grads_and_vars, clip_ratio)
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/contrib/opt/python/training/multitask_optimizer_wrapper.py", line 139, in clip_gradients_by_global_norm
nonzero_gradients = [_replace_nonexisting_grad(g) for g in gradients]
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/contrib/opt/python/training/multitask_optimizer_wrapper.py", line 139, in
nonzero_gradients = [_replace_nonexisting_grad(g) for g in gradients]
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/contrib/opt/python/training/multitask_optimizer_wrapper.py", line 137, in _replace_nonexisting_grad
lambda: grad)
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 507, in new_func
return func(*args, **kwargs)
File "/home/gallup/anaconda3/envs/delta-py3.6-tf1.14/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2007, in cond
"Incompatible return values of true_fn and false_fn: {}".format(e))
ValueError: Incompatible return values of true_fn and false_fn: The two structures don't have the same nested structure.
First structure: type=Tensor str=Tensor("train/cond_1/zeros:0", shape=(), dtype=float32)
Second structure: type=IndexedSlices str=IndexedSlices(indices=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape_1:0", shape=(?,), dtype=int32), values=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape:0", shape=(?, 300), dtype=float32), dense_shape=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Const:0", shape=(2,), dtype=int32))
More specifically: Substructure "type=IndexedSlices str=IndexedSlices(indices=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape_1:0", shape=(?,), dtype=int32), values=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Reshape:0", shape=(?, 300), dtype=float32), dense_shape=Tensor("train/gradients/joint_bilstm_crf_model/embedding/embedding_lookup_grad/Const:0", shape=(2,), dtype=int32))" is a sequence, while substructure "type=Tensor str=Tensor("train/cond_1/zeros:0", shape=(), dtype=float32)" is not
Entire first structure:
.
Entire second structure:
4. See error
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Is your feature request related to a problem? Please describe.
using conda+pip to install tensorflow, and also fix README.md
Describe the solution you'd like
N/A.
Describe alternatives you've considered
Additional context
arcface loss unit test not pass using conda to install tensorflow, beacuse number precision which caused by Tensorflow Compile Flags. conda may re-compile tensorflow for source by itself and not support some SIMD for linux x86.
Thank you for the very useful project.
Describe the bug
A simple error is thrown when trying to convert the snli model to tflite.
The error is:
Params:
stage: -1 - 100
TARGET: linux
ARCH: x86_64
INPUT_MODEL: /user/caleb.p/Development/delta/./dpl/model
INPUT_YAML: /user/caleb.p/Development/delta/./dpl/model/model.yaml
OUTPUT_MODEL: /user/caleb.p/Development/delta/./dpl/.gen
Input: /user/caleb.p/Development/delta/./dpl/model
Output: /user/caleb.p/Development/delta/./dpl/.gen
Convert model...
~/Development/delta/dpl/gadapter ~/Development/delta/dpl
OUTPUT_NUM: 2
OUTPUT_NAMES: ,ArgMax:0,score:0
Satrt transform graph ...
tflite to be added.
convert model error
To Reproduce
Steps to reproduce the behavior:
delta/egs/snli/match/v1/config/rnn_match.yml
model:
custom_ops_path: "../dpl/output/lib/custom_ops/libx_ops.so"
graphs:
-
# meta data
id: 0
name: "snli_encoder" # model name
# deltann type
server_type: "local" # local, remote
engine: "TFLITE" # TF, TFLITE, TFTRT, TFSERVING
# model config
version: 1 # model version
local: # local run
path: "../dpl/output/model/saved_model" # model path without version info
model_type: "saved_model" # e.g. saved_model, frozen_graph_pb, frozen_graph_txt
# inputs and outputs
inputs:
-
id: 0
name: "input_sent_left:0"
shape: [-1]
dtype: "string"
-
id: 1
name: "input_sent_right:0"
shape: [-1]
dtype: "string"
outputs:
-
id: 0
name: "ArgMax:0"
shape: [-1]
dtype: "int64"
-
id: 1
name: "score:0"
shape: [-1, 3]
dtype: "float"
runtime:
num_threads: 20
serving:
max_worker: 5
max_queue: 100
Expected behavior
Deployment artifacts to be created in output folder
Desktop (please complete the following information):
python3 delta/main.py --cmd train_and_eval --config egs/yahoo_answer/text_cls/v1/config/han-cls.yml
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/aswin/anaconda3/envs/tfgpu/lib/python3.7/site-packages/tensorboard/compat/tensorflow_stub/dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
File "delta/main.py", line 25, in
from delta import utils
ModuleNotFoundError: No module named 'delta'
Describe the bug
after train_and_eval, I set a new test path, get FileNotFoundError
To Reproduce
Steps to reproduce the behavior:
Expected behavior
infer new test path
thus tf 1.13.0 needs CUDA 10.0 ....
flake8 testing of https://github.com/didi/delta on Python 3.7.1
$ flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
./egs/iemocap/emo/v1/local/python/features.py:328:19: F821 undefined name 'plt'
fig, ax = plt.subplots()
^
./egs/iemocap/emo/v1/local/python/features.py:332:19: F821 undefined name 'plt'
imgplot = plt.imshow(chromaGramToPlot)
^
./egs/iemocap/emo/v1/local/python/features.py:345:9: F821 undefined name 'plt'
plt.colorbar()
^
./egs/iemocap/emo/v1/local/python/features.py:346:9: F821 undefined name 'plt'
plt.show()
^
./egs/iemocap/emo/v1/local/python/features.py:361:15: F821 undefined name 'lpc'
A, e, k = lpc(x1, ncoeff)
^
./egs/iemocap/emo/v1/local/python/features.py:393:21: F821 undefined name 'utilities'
[pos1, _] = utilities.peakdet(stFeatures[i, :], DifThres) # detect local maxima
^
./egs/iemocap/emo/v1/local/python/features.py:402:13: F821 undefined name 'plt'
plt.subplot(9, 2, ii + 1)
^
./egs/iemocap/emo/v1/local/python/features.py:403:13: F821 undefined name 'plt'
plt.plot(stFeatures[i, :], 'k')
^
./egs/iemocap/emo/v1/local/python/features.py:405:17: F821 undefined name 'plt'
plt.plot(k, stFeatures[i, k], 'k*')
^
./egs/iemocap/emo/v1/local/python/features.py:406:18: F821 undefined name 'plt'
f1 = plt.gca()
^
./egs/iemocap/emo/v1/local/python/features.py:411:9: F821 undefined name 'plt'
plt.show(block=False)
^
./egs/iemocap/emo/v1/local/python/features.py:412:9: F821 undefined name 'plt'
plt.figure()
^
./egs/iemocap/emo/v1/local/python/features.py:426:9: F821 undefined name 'plt'
plt.plot(BPMs, HistAll, 'k')
^
./egs/iemocap/emo/v1/local/python/features.py:427:9: F821 undefined name 'plt'
plt.xlabel('Beats per minute')
^
./egs/iemocap/emo/v1/local/python/features.py:428:9: F821 undefined name 'plt'
plt.ylabel('Freq Count')
^
./egs/iemocap/emo/v1/local/python/features.py:429:9: F821 undefined name 'plt'
plt.show(block=True)
^
./egs/iemocap/emo/v1/local/python/features.py:478:19: F821 undefined name 'plt'
fig, ax = plt.subplots()
^
./egs/iemocap/emo/v1/local/python/features.py:479:19: F821 undefined name 'plt'
imgplot = plt.imshow(specgram.transpose()[::-1, :])
^
./egs/iemocap/emo/v1/local/python/features.py:493:9: F821 undefined name 'plt'
plt.colorbar()
^
./egs/iemocap/emo/v1/local/python/features.py:494:9: F821 undefined name 'plt'
plt.show()
^
./egs/iemocap/emo/v1/local/python/features.py:706:19: F821 undefined name 'audioBasicIO'
[Fs, x] = audioBasicIO.readAudioFile(wavFile) # read file
^
./egs/iemocap/emo/v1/local/python/features.py:708:13: F821 undefined name 'audioBasicIO'
x = audioBasicIO.stereo2mono(x) # convert stereo to mono
^
./egs/iemocap/emo/v1/local/python/features.py:784:19: F821 undefined name 'audioBasicIO'
[Fs, x] = audioBasicIO.readAudioFile(wavFile) # read file
^
./egs/iemocap/emo/v1/local/python/features.py:785:13: F821 undefined name 'audioBasicIO'
x = audioBasicIO.stereo2mono(x) # convert stereo to mono
^
./egs/iemocap/emo/v1/local/python/features.py:815:15: F821 undefined name 'audioBasicIO'
[Fs, x] = audioBasicIO.readAudioFile(fileName) # read the wav file
^
./egs/iemocap/emo/v1/local/python/features.py:816:9: F821 undefined name 'audioBasicIO'
x = audioBasicIO.stereo2mono(x) # convert to MONO if required
^
./delta/layers/transformer.py:248:7: F821 undefined name 'logging'
logging.error(error_info)
^
./delta/data/task/speech_cls_task.py:724:39: F821 undefined name 'feat'
soft_label = self.teacher(feat)
^
28 F821 undefined name 'feat'
28
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.