nmt_keras icon indicating copy to clipboard operation
nmt_keras copied to clipboard

Error while decoding sequence

Open nashid opened this issue 5 years ago • 0 comments

Tried to run this code without any modification and it fails in the decode stage.

<ipython-input-35-891b4c7b39df> in <module>()
      1 for seq_index in [14077,20122,40035,40064, 40056, 40068, 40090, 40095, 40100, 40119, 40131, 40136, 40150, 40153]:
      2     input_seq = encoder_input_data[seq_index: seq_index + 1]
----> 3     decoded_sentence = decode_sequence(input_seq)
      4     print('-')
      5     print('Input sentence:', lines.eng[seq_index: seq_index + 1])

3 frames
/usr/local/lib/python3.6/dist-packages/keras/engine/training_utils.py in standardize_input_data(data, names, shapes, check_batch_axis, exception_prefix)
    103                 'Expected to see ' + str(len(names)) + ' array(s), '
    104                 'but instead got the following list of ' +
--> 105                 str(len(data)) + ' arrays: ' + str(data)[:200] + '...')
    106         elif len(names) > 1:
    107             raise ValueError(

ValueError: Error when checking model input: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 3 array(s), but instead got the following list of 1 arrays: [array([[1.]])]...```

nashid avatar Mar 06 '20 21:03 nashid