org.tensorflow.Graph.operation()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(186)

本文整理了Java中org.tensorflow.Graph.operation()方法的一些代码示例,展示了Graph.operation()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.operation()方法的具体详情如下:
包路径:org.tensorflow.Graph
类名称:Graph
方法名:operation

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);
 }
}

相关文章