Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error in tf 2.3 and tfa 11.2 #12

Open
Sanyorke-Han opened this issue Sep 8, 2020 · 0 comments
Open

error in tf 2.3 and tfa 11.2 #12

Sanyorke-Han opened this issue Sep 8, 2020 · 0 comments

Comments

@Sanyorke-Han
Copy link

i tried on my environment with tensorflow 2.3 and tensorflow-addons 11.2, encountered exceptions. do you have plan to upgrade the code?

screenshot pasted below:
: Invalid argument: slice index 0 of dimension 0 out of bounds.
Traceback (most recent call last):
File "train.py", line 79, in
accuracy = get_acc_one_step(logits, text_lens, labels_batch)
File "train.py", line 59, in get_acc_one_step
viterbi_path, _ = tf_ad.text.viterbi_decode(logit[:text_len], model.transition_params)
File "C:\Python37\lib\site-packages\tensorflow_addons\text\crf.py", line 362, in viterbi_decode
trellis[0] = score[0]
File "C:\Python37\lib\site-packages\tensorflow\python\util\dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
File "C:\Python37\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1024, in _slice_helper
name=name)
File "C:\Python37\lib\site-packages\tensorflow\python\util\dispatch.py", line 201, in wrapper
return target(*args, **kwargs)
File "C:\Python37\lib\site-packages\tensorflow\python\ops\array_ops.py", line 1196, in strided_slice
shrink_axis_mask=shrink_axis_mask)
File "C:\Python37\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 10320, in strided_slice
_ops.raise_from_not_ok_status(e, name)
File "C:\Python37\lib\site-packages\tensorflow\python\framework\ops.py", line 6843, in raise_from_not_ok_status

six.raise_from(core._status_to_exception(e.code, message), None)

File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: slice index 0 of dimension 0 out of bounds. [Op:StridedSlice] name: strided_slice/

thanks
sanyorke

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant