Hello, I have recently installed TorchServe on Windows 10 using pip:
pip install -f https://download.pytorch.org/whl/torch_stable.html 2 torchserve torch-model-archiver
I had no problems archiving the sample model, it generated the output file densenet161.mar:
torch-model-archiver --model-name densenet161 --version 1.0 --model-file serve/examples/image_classifier/densenet_161/model.py --serialized-file model_store/densenet161-8d451a50.pth --extra-files serve/examples/image_classifier/index_to_name.json --handler image_classifier
But when I try to start the server with following line (model_store subdirectory is inside current directory):
torchserve --start --model-store model_store --models model_store/densenet161.mar
Then I got following error:
Error: Could not find or load main class org.pytorch.serve.ModelServer
Caused by: java.lang.ClassNotFoundException: org.pytorch.serve.ModelServer
Java version:
java –version
java version “11” 2018-09-25
Java™ SE Runtime Environment 18.9 (build 11+28)
Java HotSpot™ 64-Bit Server VM 18.9 (build 11+28, mixed mode)
Python version:
Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] on win32
PyTorch version:



print(torch.version)
1.5.0+cpu



I appreciate any help. Thanks in advance.