deeplearning4j/deeplearning4j · error · NoOpNameFoundException
No onnx op opName found for setrange
Error message
No onnx op opName found for setrange
What it means
SetRange has no ONNX operator equivalent, so onnxName() throws NoOpNameFoundException for opName() "setrange". ND4J throws this whenever framework name resolution finds no registered mapping for the op.
Solutions
- Replace SetRange with an ONNX-representable equivalent (e.g. clip/min+max composition)
- Express the range operation from primitive ONNX ops before export
- Catch NoOpNameFoundException during export and substitute or drop the node
- Add a custom op mapping/subclass overriding onnxName() if your exporter supports it
Example fix
// before SDVariable y = sd.math.setRange(x, min, max); // after SDVariable y = sd.math.clip(x, min, max); // clip-by-value, ONNX-mappable
Defensive patterns
Strategy: try-catch
Validate before calling
try { new SetRange().onnxName(); return true; } catch (NoOpNameFoundException e) { return false; } // use clip instead Type guard
static boolean onnxExportable(Op op) {
try { op.onnxName(); return true; } catch (NoOpNameFoundException e) { return false; }
} Try / catch
try {
exporter.addOp(op, op.onnxName());
} catch (NoOpNameFoundException e) {
exporter.addOp(clipByValueRewrite(op)); // min(max(x,min),max)
} Prevention
- Replace SetRange with clip/min/max compositions by default — they export everywhere
- Run an onnxName() support scan over graphs before export
- Avoid ND4J-specific transform ops when building cross-framework models
- Document internal activation choices with their framework-mapping status
When it happens
Trigger: Calling SetRange.onnxName(); exporting a SameDiff graph containing a SetRange node to ONNX; ONNX export tooling enumerating all ops in the graph.
Common situations: ONNX conversion of models using setrange-style range-clamping transforms; custom activation pipelines built on SetRange then exported.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- No onnx op found for sin
- No ONNX op name found for…
- No onnx op opName found for
- No onnx op opName found for
- No onnx op opName found for
AI-assisted analysis of deeplearning4j/deeplearning4j@4c22ac5fe4 (2026-09-07).
Data as JSON: /api/errors/1d14d949e103e7d4.
Report an issue: GitHub.
Appendix: source
Thrown at nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/ops/impl/transforms/strict/SetRange.java:72
public SetRange(INDArray x, double min, double max) {
super(x);
this.min = min;
this.max = max;
this.extraArgs = new Object[] {min, max};
}
@Override
public int opNum() {
return 25;
}
@Override
public String opName() {
return "setrange";
}
@Override
public String onnxName() {
throw new NoOpNameFoundException("No onnx op opName found for " + opName());
}
@Override
public String tensorflowName() {
throw new NoOpNameFoundException("No tensorflow op opName found for " + opName());
}
@Override
public List<SDVariable> doDiff(List<SDVariable> f1) {
return null;
}
}
View on GitHub (pinned to 4c22ac5fe4)