Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Ock__Ssoonan
Beginner
135 Views

Error when converting bidirectional LSTM from pb to IR in tf 1.14 keras

Hi. I built text recognition model by tf keras 1,14 and converted it successfully to pb.

But when I try to convert pb to IR, an error occurred.

python mo_tf.py --saved_model_dir ~

[ ERROR ]  'ascii' codec can't decode byte 0x8d in position 1: ordinal not in range(128)
Unexpected exception happened during extracting attributes for node {bidirectional LSTM layer name}/backward_lstm_1/bias/Read/ReadVariableOp.
Original exception message: 'ascii' codec can't decode byte 0x8d in position 1: ordinal not in range(128)

 

I built my model 

a = Bidirectional(LSTM(units=lstm_units, return_sequences=True), name='biLSTM_1')(a)
a = Bidirectional(LSTM(units=lstm_units, return_sequences=True), name='biLSTM_2')(a)

like this code.

After debugging, at deployment_tools/model_optimizer/mo/front/tf/extractors/utils.py,

in def tf_tensor_content function, np.array(value[0], dtype=type_helper[0])  was causing an error.

I think keras's bidirectional wrapper is the problem, but I dont know how to fix it.

Any help would be appreciated. Thank you.

 

 

0 Kudos
0 Replies
Reply