本文整理了Java中org.tensorflow.Graph.ref()
方法的一些代码示例,展示了Graph.ref()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Graph.ref()
方法的具体详情如下:
包路径:org.tensorflow.Graph
类名称:Graph
方法名:ref
暂无
代码示例来源:origin: org.tensorflow/libtensorflow
/** Wrap an existing session with the associated {@link Graph}. */
Session(Graph g, long nativeHandle) {
graph = g;
this.nativeHandle = nativeHandle;
graphRef = g.ref();
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
/** Wrap an existing session with the associated {@link Graph}. */
Session(Graph g, long nativeHandle) {
graph = g;
this.nativeHandle = nativeHandle;
graphRef = g.ref();
}
代码示例来源:origin: org.tensorflow/libtensorflow
public OperationBuilder setDevice(String device) {
Graph.Reference r = graph.ref();
try {
setDevice(unsafeNativeHandle, device);
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.tensorflow/libtensorflow
public OperationBuilder setAttr(String name, long[] value) {
Graph.Reference r = graph.ref();
try {
setAttrIntList(unsafeNativeHandle, name, value);
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
public OperationBuilder setAttr(String name, float[] value) {
Graph.Reference r = graph.ref();
try {
setAttrFloatList(unsafeNativeHandle, name, value);
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.tensorflow/libtensorflow
/** Returns the number of tensors produced by this operation. */
public int numOutputs() {
Graph.Reference r = graph.ref();
try {
return numOutputs(unsafeNativeHandle);
} finally {
r.close();
}
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
public OperationBuilder setDevice(String device) {
Graph.Reference r = graph.ref();
try {
setDevice(unsafeNativeHandle, device);
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
/** Returns the full name of the Operation. */
public String name() {
Graph.Reference r = graph.ref();
try {
return name(unsafeNativeHandle);
} finally {
r.close();
}
}
代码示例来源:origin: org.tensorflow/libtensorflow
public OperationBuilder setAttr(String name, byte[] value) {
Graph.Reference r = graph.ref();
try {
setAttrString(unsafeNativeHandle, name, value);
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.tensorflow/libtensorflow
/** Returns the full name of the Operation. */
public String name() {
Graph.Reference r = graph.ref();
try {
return name(unsafeNativeHandle);
} finally {
r.close();
}
}
代码示例来源:origin: org.tensorflow/libtensorflow
/**
* Returns the type of the operation, i.e., the name of the computation performed by the
* operation.
*/
public String type() {
Graph.Reference r = graph.ref();
try {
return type(unsafeNativeHandle);
} finally {
r.close();
}
}
代码示例来源:origin: org.tensorflow/libtensorflow
public OperationBuilder setAttr(String name, float[] value) {
Graph.Reference r = graph.ref();
try {
setAttrFloatList(unsafeNativeHandle, name, value);
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.tensorflow/libtensorflow
public OperationBuilder setAttr(String name, boolean[] value) {
Graph.Reference r = graph.ref();
try {
setAttrBoolList(unsafeNativeHandle, name, value);
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.tensorflow/libtensorflow
public OperationBuilder setAttr(String name, Tensor<?> value) {
Graph.Reference r = graph.ref();
try {
setAttrTensor(unsafeNativeHandle, name, value.getNativeHandle());
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
OperationBuilder(Graph graph, String type, String name) {
this.graph = graph;
Graph.Reference r = graph.ref();
try {
this.unsafeNativeHandle = allocate(r.nativeHandle(), type, name);
} finally {
r.close();
}
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
public OperationBuilder setAttr(String name, DataType value) {
Graph.Reference r = graph.ref();
try {
setAttrType(unsafeNativeHandle, name, value.c());
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.tensorflow/libtensorflow
public OperationBuilder setAttr(String name, DataType value) {
Graph.Reference r = graph.ref();
try {
setAttrType(unsafeNativeHandle, name, value.c());
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
public OperationBuilder setAttr(String name, Tensor<?> value) {
Graph.Reference r = graph.ref();
try {
setAttrTensor(unsafeNativeHandle, name, value.getNativeHandle());
} finally {
r.close();
}
return this;
}
代码示例来源:origin: org.bytedeco.javacpp-presets/tensorflow
long[] shape(int output) {
Graph.Reference r = graph.ref();
try {
return shape(r.nativeHandle(), unsafeNativeHandle, output);
} finally {
r.close();
}
}
代码示例来源:origin: org.tensorflow/libtensorflow
long[] shape(int output) {
Graph.Reference r = graph.ref();
try {
return shape(r.nativeHandle(), unsafeNativeHandle, output);
} finally {
r.close();
}
}
内容来源于网络,如有侵权,请联系作者删除!