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 list2sparsetensor #26

Open
cuhkebook opened this issue Oct 26, 2017 · 0 comments
Open

Error in list2sparsetensor #26

cuhkebook opened this issue Oct 26, 2017 · 0 comments

Comments

@cuhkebook
Copy link

I got an error as

if l == padded_value:
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

I found "l" is a 1D array and cannot be compared to single value so in the trainin_joint_ctc_attention, the ctc_labels (bold one in below, which equals to "l" in above) should be ctc_labels[0] or ctc_labels?


feed_dict_train = {
model.inputs_pl_list[0]: inputs[0],
model.labels_pl_list[0]: labels_train[0],
model.ctc_labels_pl_list[0]: list2sparsetensor(
ctc_labels, padded_value=train_data.ctc_padded_value),

model.inputs_seq_len_pl_list[0]: inputs_seq_len[0],
model.labels_seq_len_pl_list[0]: labels_seq_len[0],
model.keep_prob_encoder_pl_list[0]: 1 - float(params['dropout_encoder']),
model.keep_prob_decoder_pl_list[0]: 1 - float(params['dropout_decoder']),
model.keep_prob_embedding_pl_list[0]: 1 - float(params['dropout_embedding']),
learning_rate_pl: learning_rate
}

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