OpenNMT Forum

CTranslate2 model conversion error

I am trying to run ctranlsate2 on windows 10 system but getting error when trying to run github cloned ctranslate2 .
This is the code I am running from pyhton path within in ctranslate2 folder:

python -m ctranslate2.bin.opennmt_tf_converter --model_path /model/saved_model.model --src_vocab /customEngine_Inference/sample_model1/source_vocabulary.txt --tgt_vocab /customEngine_Inference/sample_model1/target_vovabulary.txt --model_spec TransformerBase --quantization int16 --output_dir output_folder.


Unsuccessful TensorSliceReader constructor: Failed to get matching files on /customEngine_Inference/sample_model1/model.bin: Not found: FindFirstFile failed for: /customEngine_Inference/sample_model1 : The system cannot find the path specified.
; No such process

Can you post the full error log?

What is the content of /model directory?

saved_model.model file path

What is this file? The --model_path option should either be the directory containing checkpoints or a SavedModel directory.

Yes. In --model_path , I am providing the savemodel directory as follows:
–model_path test_data/savedmodel.model

So what is content of the directory savedmodel.model? Apparently it is not a SavedModel.

Thanks @guillaumekln for your support. It worked now. I was ignorant in giving proper model path. I am able to generate a model.bin file. I need to explore now on how to use it for inference.