Error with custom config for classification model

Hello,

I use BERT-model for classification.
according to the tutorial I trained my own model for classification.
Everything is OK.
Then I started: python -m deeppavlov riseapi /data/home/alex/config.json -p 5000
And I got an error. In the new config I pointed correct links.

2020-04-14 11:19:26.789 ERROR in ‘deeppavlov.core.common.params’[‘params’] at line 112: Exception in <class ‘deeppavlov.models.bert.bert_classifier.BertClassifierModel’>
Traceback (most recent call last):
File “/data/anaconda/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/client/session.py”, line 1365, in _do_call
return fn(*args)
File “/data/anaconda/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/client/session.py”, line 1350, in _run_fn
target_list, run_metadata)
File “/data/anaconda/envs/py36/lib/python3.6/site-packages/tensorflow_core/python/client/session.py”, line 1443, in _call_tf_sessionrun
run_metadata)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Assign requires shapes of both tensors to match. lhs shape= [28996,768] rhs shape= [119547,768]
[[{{node save/Assign_4}}]]

Hello!

These shapes lhs shape= [28996,768] rhs shape= [119547,768] are input dimensionality of BERT-model. The first numbers are subtokens vocabulary sizes (28996 and 119547).
It seems like you have trained the model correctly with one particular BERT-model (this is probably English BERT by Google) and now you are trying to infer your model using another BERT subtokens vocabulary (Russian or multi-lingual). Please, make sure that you specified correct paths to BERT-vocabulary and BERT-model.

Thanks! I trained on multilanguage Bert but in the config used another model.