Unknown builtin op: torchvision::nms
See original GitHub issuebuild.gradle
plugins {
id 'java'
}
repositories {
mavenCentral()
}
dependencies {
implementation group: 'ai.djl.pytorch', name: 'pytorch-engine', version: '0.10.0'
implementation group: 'ai.djl.pytorch', name: 'pytorch-native-cpu', version: '1.7.1'
implementation group: 'org.slf4j', name: 'slf4j-simple', version: '1.7.30'
}
Predict.java
import ai.djl.MalformedModelException;
import ai.djl.Model;
import javax.imageio.ImageIO;
import java.awt.image.BufferedImage;
import java.io.IOException;
public class Predict {
public static void main(String[] args) {
Path modelDir = Paths.get("src/main/resources/fasterrcnn_resnet50.pt");
try (Model model = Model.newInstance("fasterrcnn_resnet50")) {
model.load(modelDir);
} catch (IOException | MalformedModelException e) {
e.printStackTrace();
}
}
}
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Unknown builtin op: torchvision::nms when loading scripted ...
Bug Scripted FasterRCNN saved to a .pt-file cannot be loaded via torch.script.load due to Unknown builtin op: torchvision::nms.
Read more >Torch Vision C++ interface error "Unknown builtin op: torchvision
Any ideas or suggestion on how to cure this error: seems like the operator nms is not registered. By the way the master...
Read more >No such operator torchvision::nms Fix - Pav Creations
Unknown builtin op : torchvision::nms. Could not find any similar ops to torchvision::nms. This op may not exist or may not be currently ......
Read more >"Unknown Builtin Op: Torchvision::Nms" - ADocLib
Scripting a function or nn.Module will inspect the source code compile it as TorchScript code using the TorchScript compiler and return a ScriptModule...
Read more >Torchscript frcnn model with nms in python and load in C++ ...
I'm still running into problems when loading the scripted model in libtorch complaining about nms being an “Unknown builtin op”. Here's the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@anandvsr nms is TorchVision operator that we don’t support. It is still blocked by https://github.com/pytorch/vision/issues/2692.
Thanks @stu1130 , I tried, but not able to run
make
command aftercmake ..
. It gives make *** no targets specified and no makefile found. stop. Don’t know where I’m going wrong. I tried it on Windows 10 through anaconda prompt.