Coder Social home page Coder Social logo

asr_transformer's People

Contributors

luka0612 avatar

Watchers

 avatar

Forkers

buddy23333

asr_transformer's Issues

TypeError: Value passed to parameter 'indices' has DataType float64 not in list of allowed values: int32, int64

Traceback (most recent call last):
File "/home/uvideo/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 2667, in gather
return params.sparse_read(indices, name=name)
AttributeError: 'Tensor' object has no attribute 'sparse_read'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "train.py", line 51, in
tmodel.build_test_model(get_wer=True)
File "/home/uvideo/huatianxiang/asr_transformer/transformer.py", line 268, in build_test_model
self.test_preds = self.get_beam_search_preds(reuse=reuse, is_training=is_training, get_wer=get_wer)
File "/home/uvideo/huatianxiang/asr_transformer/transformer.py", line 247, in get_beam_search_preds
return self.make_parallel_beam_search(reuse=reuse, is_training=is_training, get_wer=get_wer)
File "/home/uvideo/huatianxiang/asr_transformer/transformer.py", line 614, in make_parallel_beam_search
prediction = self.model_beam_search_preds(X, reuse, is_training, scope="transformer")
File "/home/uvideo/huatianxiang/asr_transformer/transformer.py", line 264, in model_beam_search_preds
test_preds = self.beam_search(enc_output, reuse)
File "/home/uvideo/huatianxiang/asr_transformer/transformer.py", line 428, in beam_search
back_prop=False)
File "/home/uvideo/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 3274, in while_loop
return_same_structure)
File "/home/uvideo/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2994, in BuildLoop
pred, body, original_loop_vars, loop_vars, shape_invariants)
File "/home/uvideo/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/ops/control_flow_ops.py", line 2929, in _BuildLoop
body_result = body(*packed_vars_for_body)
File "/home/uvideo/huatianxiang/asr_transformer/transformer.py", line 401, in step
preds = tf.gather(preds, indices=tf.cast(k_indices, tf.int64) / beam_size)
File "/home/uvideo/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 2669, in gather
return gen_array_ops.gather_v2(params, indices, axis, name=name)
File "/home/uvideo/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 3232, in gather_v2
"GatherV2", params=params, indices=indices, axis=axis, name=name)
File "/home/uvideo/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 609, in _apply_op_helper
param_name=input_name)
File "/home/uvideo/anaconda3/envs/nlp/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 60, in _SatisfiesTypeConstraint
", ".join(dtypes.as_dtype(x).name for x in allowed_list)))
TypeError: Value passed to parameter 'indices' has DataType float64 not in list of allowed values: int32, int64 你好,我运行的代码出现上面的错误是什么原因啊,环境python3.6 和tf1.11.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.