1

如何从我的代码中将此错误转换为警告(ignore_longer_outputs_than_inputs)?[.ipynb]

labels = Input(name='the_labels', shape=[max_label_len], dtype='float32')
input_length = Input(name='input_length', shape=[1], dtype='int64')
label_length = Input(name='label_length', shape=[1], dtype='int64')

def ctc_lambda_func(args):
    y_pred, labels, input_length, label_length = args

    return K.ctc_batch_cost(labels, y_pred, input_length, label_length)


loss_out = Lambda(ctc_lambda_func, output_shape=(1,), name='ctc')([outputs, labels, input_length, label_length])

#model to be used at training time
model = Model(inputs=[inputs, labels, input_length, label_length], outputs=loss_out)

如果你愿意,你可以在这里查看我的完整代码:https ://colab.research.google.com/drive/1nMRNUsLDNrpgeTxPFQ4mhobnFdpbmwUx

4

1 回答 1

0

注意:这不是数据集错误,而是因为我的架构对 CTC 的输出形状

于 2020-05-18T10:23:00.873 回答