Encoding sentences with Setenece BERT's model in FastAPI changes the result from the results with Jupyter and python scripts
sorry, I use Japanese model but I forgat translate default BertTokenizer to BertJapaneseTokenizer.
Change default Tokenizer fixed this problem.
System

macbook pro
OSX 10.15.5(Catalina)
Docker version 19.03.12, build 48a66213fe

Library

uvicorn==0.11.8
fastapi==0.61.0
torch==1.6.0
transformers==3.0.2
sentence-transformers==0.3.2
scikit-learn==0.20.0
scipy==1.4.1
pandas==0.23.4
jupyter==1.0.0

Detail
I used Colaboratory to fine-tune Setence BERT and save that model.
Then I went local and built an environment with Docker that included jupyter and FastAPI, and in that environment I was able to confirm that the model I saved with Jupyter, launched in Docker, returned the same estimation results as in the Collaboratory.
When I used that model, I got different results when I used FastAPI started in the same Docker environment as Jupyter.
All the text entered in this flow is the same.
The analysis showed that the SentenceTransformer loaded the model and then encoded it, and found that it calculated completely different embedding.
Thanks to your advice.