Skip to content

Conversation

Ageliss
Copy link
Contributor

@Ageliss Ageliss commented Feb 22, 2020

Thanks for sharing the code to the cpp libtorch starters. I found something needs to be updated and hope others won't need to do it again.

  1. prediction.cpp should be updated as pull request.

  2. model_trace.py: "model = torchvision.models.resnet18(pretrained=True)" may result "SSL: CERTIFICATE_VERIFY_FAILED", which can be solved by adjusting "https://" into "http://" in "torchvision.models.resnet.model_urls"...

  3. the installation of dependant libs of opencv and libtorch maybe hard for starters, will be better if mentioned in step 0 or 1 in README.md
    like:
    install libs of opencv:
    for MacOS, xcode-select --install, install XCODE in app store(will automatically install cmake make gcc g++ I guess), apt install opencv(will install opencv4.0 and take a really long time).....
    install libtorch:
    wget https://download.pytorch.org/libtorch/nightly/cpu/libtorch-shared-with-deps-latest.zip
    unzip libtorch-shared-with-deps-latest.zip

for Linux:
apt install gcc
apt install c++
apt install cmake
apt install make
and etc...

  1. when doing "make", some linux machines with RAM less than 1.5G(maybe) will get internal compiler error. So recommend starters to compile on the bigger RAM machine...

@BIGBALLON
Copy link
Owner

Hi, @Ageliss There are lots of changes after PyTorch tagv1.0. , thanks for your PR!!! It's very helpful for other users

@BIGBALLON BIGBALLON closed this Feb 22, 2020
@BIGBALLON BIGBALLON reopened this Feb 22, 2020
@BIGBALLON BIGBALLON merged commit 418ea31 into BIGBALLON:master Feb 22, 2020
@yueyihua yueyihua mentioned this pull request May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants