Skip to content

Commit

Permalink
Rebase for #365 (#389)
Browse files Browse the repository at this point in the history
* Updated README.md for #364

See #364 for a deep description of the problem

* updated README.md

* updated README.md

Co-authored-by: Francesco Saverio Zuppichini <zuppif@usi.ch>
  • Loading branch information
maaquib and Francesco Saverio Zuppichini committed May 22, 2020
1 parent 2ae95a1 commit de258cf
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions examples/image_classifier/README.md
Expand Up @@ -45,6 +45,7 @@
from torchvision import models
import torch
model = models.densenet161(pretrained=True)
model.eval()
example_input = torch.rand(1, 3, 224, 224)
traced_script_module = torch.jit.trace(model, example_input)
traced_script_module.save("dense161.pt")
Expand Down
3 changes: 2 additions & 1 deletion examples/image_classifier/resnet_152_batch/README.md
Expand Up @@ -45,6 +45,7 @@ curl http://127.0.0.1:8080/predictions/resnet152 -T ./serve/examples/image_class
from torchvision import models
import torch
model = models.resnet152(pretrained=True)
model.eval()
example_input = torch.rand(1, 3, 224, 224)
traced_script_module = torch.jit.trace(model, example_input)
traced_script_module.save("resnet-152-batch.pt")
Expand All @@ -66,4 +67,4 @@ curl http://127.0.0.1:8080/predictions/resnet152 -T ./serve/examples/image_class
curl http://127.0.0.1:8080/predictions/resnet152 -T ./serve/examples/image_classifier/resnet_152_batch/images/croco.jpg &
curl http://127.0.0.1:8080/predictions/resnet152 -T ./serve/examples/image_classifier/resnet_152_batch/images/dog.jpg &
curl http://127.0.0.1:8080/predictions/resnet152 -T ./serve/examples/image_classifier/resnet_152_batch/images/kitten.jpg &
```
```
1 change: 1 addition & 0 deletions examples/image_classifier/resnet_18/README.md
Expand Up @@ -31,6 +31,7 @@ curl http://127.0.0.1:8080/predictions/resnet-18 -T ./serve/examples/image_class
from torchvision import models
import torch
model = models.resnet18(pretrained=True)
model.eval()
example_input = torch.rand(1, 3, 224, 224)
traced_script_module = torch.jit.trace(model, example_input)
traced_script_module.save("resnet-18.pt")
Expand Down

0 comments on commit de258cf

Please sign in to comment.