本文整理了Java中org.tensorflow.Graph.operation()
方法的一些代码示例,展示了Graph.operation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.operation()
方法的具体详情如下:
包路径:org.tensorflow.Graph
类名称:Graph
方法名:operation
[英]Returns the operation (node in the Graph) with the provided name.
Or null if no such operation exists in the Graph.
[中]
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
private Operation operationByName(String opName) {
Operation op = graph.operation(opName);
if (op == null) {
throw new IllegalArgumentException("No Operation named [" + opName + "] in the Graph");
}
return op;
}
代码示例来源:origin: org.tensorflow/libtensorflow
private Operation operationByName(String opName) {
Operation op = graph.operation(opName);
if (op == null) {
throw new IllegalArgumentException("No Operation named [" + opName + "] in the Graph");
}
return op;
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
public Operation graphOperation(String operationName) {
final Operation operation = g.operation(operationName);
if (operation == null) {
throw new RuntimeException(
"Node '" + operationName + "' does not exist in model '" + modelName + "'");
}
return operation;
}
代码示例来源:origin: org.tensorflow/libtensorflow
/**
* Returns the operation (node in the Graph) with the provided name.
*
* <p>Or {@code null} if no such operation exists in the Graph.
*/
public Operation operation(String name) {
synchronized (nativeHandleLock) {
long oph = operation(nativeHandle, name);
if (oph == 0) {
return null;
}
return new Operation(this, oph);
}
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
/**
* Returns the operation (node in the Graph) with the provided name.
*
* <p>Or {@code null} if no such operation exists in the Graph.
*/
public Operation operation(String name) {
synchronized (nativeHandleLock) {
long oph = operation(nativeHandle, name);
if (oph == 0) {
return null;
}
return new Operation(this, oph);
}
}
内容来源于网络,如有侵权,请联系作者删除!