Torchvision for c++17

I would like to use torchvision with C++17.

I’m trying these

  1. install torchvision from pip
  2. export nms from torchvision with python code
  3. build torchvision from source to use in C++
  4. load scripted model in C++

when I load the scripted model with c++17, they say there is no nms function in torchvision. When I use C++14, it works fine.

Do I need to build torchvision with C++17 by modifing CMAKEList.txt?
Do I need to use torchvision for python built with C++17?