Hello.
I have some Question about server.py
Command:
python3 server.py --ip 0.0.0.0 --port 5000 --url_root “./translator” --config “./available_models/conf.json”
Error:
Pre-loading model 100
[2019-06-03 11:17:06,458 INFO] Loading model 100
Traceback (most recent call last):
File “server.py”, line 123, in
debug=args.debug)
File “server.py”, line 24, in start
translation_server.start(config_file)
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/translate/translation_server.py”, line 102, in start
self.preload_model(opt, model_id=model_id, **kwargs)
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/translate/translation_server.py”, line 140, in preload_model
model = ServerModel(opt, model_id, **model_kwargs)
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/translate/translation_server.py”, line 227, in init
self.load()
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/translate/translation_server.py”, line 282, in load
os.devnull, “w”, “utf-8”))
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/translate/translator.py”, line 28, in build_translator
fields, model, model_opt = load_test_model(opt)
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/model_builder.py”, line 99, in load_test_model
opt.gpu)
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/model_builder.py”, line 128, in build_base_model
src_emb = build_embeddings(model_opt, src_field)
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/model_builder.py”, line 53, in build_embeddings
fix_word_vecs=fix_word_vecs
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/modules/embeddings.py”, line 167, in init
pe = PositionalEncoding(dropout, self.embedding_size)
File “/data/home/chanjun_park/work/OpenNMT-py/onmt/modules/embeddings.py”, line 35, in init
self.dropout = nn.Dropout(p=dropout)
File “/data/home/chanjun_park/.local/lib/python3.5/site-packages/torch/nn/modules/dropout.py”, line 11, in init
if p < 0 or p > 1:
TypeError: unorderable types: list() < int()
I don’t know why this is happening.
Is there any solution???