diud you download libtorch binaries from the PyTorch website, and are you using them for TX2? If that’s the case, this will not work, as libtorch binaries listed on the website are for x64 architecture (but TX2 is ARM architecture).
To build for TX2, you have to build libtorch from source. See if this thread helps: TX2 (ARM64) Install for Python 3 - Cont from nVidia Forum 312