@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.EditDistance extends Pointer
Attrs):
* normalize: boolean (if true, edit distances are normalized by length of truth).
The output is:
Returns:
* Output: A dense float tensor with rank R - 1.
For the example input:
// hypothesis represents a 2x1 matrix with variable-length values:
// (0,0) = ["a"]
// (1,0) = ["b"]
hypothesis_indices = [[0, 0, 0],
[1, 0, 0]]
hypothesis_values = ["a", "b"]
hypothesis_shape = [2, 1, 1]
// truth represents a 2x2 matrix with variable-length values:
// (0,0) = []
// (0,1) = ["a"]
// (1,0) = ["b", "c"]
// (1,1) = ["a"]
truth_indices = [[0, 1, 0],
[1, 0, 0],
[1, 0, 1],
[1, 1, 0]]
truth_values = ["a", "b", "c", "a"]
truth_shape = [2, 2, 2]
normalize = true
The output will be:
// output is a 2x2 matrix with edit distances normalized by truth lengths.
output = [[inf, 1.0], // (0,0): no truth, (0,1): no hypothesis
[0.5, 1.0]] // (1,0): addition, (1,1): no hypothesis| Modifier and Type | Class and Description |
|---|---|
static class |
tensorflow.EditDistance.Attrs
Optional attribute setters for EditDistance
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
EditDistance(Pointer p)
Pointer cast constructor.
|
EditDistance(tensorflow.Scope scope,
tensorflow.Input hypothesis_indices,
tensorflow.Input hypothesis_values,
tensorflow.Input hypothesis_shape,
tensorflow.Input truth_indices,
tensorflow.Input truth_values,
tensorflow.Input truth_shape) |
EditDistance(tensorflow.Scope scope,
tensorflow.Input hypothesis_indices,
tensorflow.Input hypothesis_values,
tensorflow.Input hypothesis_shape,
tensorflow.Input truth_indices,
tensorflow.Input truth_values,
tensorflow.Input truth_shape,
tensorflow.EditDistance.Attrs attrs) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Input |
asInput() |
tensorflow.Output |
asOutput() |
tensorflow.Node |
node() |
static tensorflow.EditDistance.Attrs |
Normalize(boolean x) |
tensorflow.Operation |
operation() |
tensorflow.EditDistance |
operation(tensorflow.Operation operation) |
tensorflow.Output |
output() |
tensorflow.EditDistance |
output(tensorflow.Output output) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, hashCode, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetof, parseBytes, physicalBytes, position, position, put, realloc, setNull, sizeof, toString, totalBytes, totalPhysicalBytes, withDeallocator, zeropublic EditDistance(Pointer p)
Pointer.Pointer(Pointer).public EditDistance(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input hypothesis_indices, @ByVal tensorflow.Input hypothesis_values, @ByVal tensorflow.Input hypothesis_shape, @ByVal tensorflow.Input truth_indices, @ByVal tensorflow.Input truth_values, @ByVal tensorflow.Input truth_shape)
public EditDistance(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.Input hypothesis_indices, @ByVal tensorflow.Input hypothesis_values, @ByVal tensorflow.Input hypothesis_shape, @ByVal tensorflow.Input truth_indices, @ByVal tensorflow.Input truth_values, @ByVal tensorflow.Input truth_shape, @Const @ByRef tensorflow.EditDistance.Attrs attrs)
@ByVal @Name(value="operator tensorflow::Output") public tensorflow.Output asOutput()
@ByVal @Name(value="operator tensorflow::Input") public tensorflow.Input asInput()
public tensorflow.Node node()
@ByVal public static tensorflow.EditDistance.Attrs Normalize(@Cast(value="bool") boolean x)
@ByRef public tensorflow.Operation operation()
public tensorflow.EditDistance operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output output()
public tensorflow.EditDistance output(tensorflow.Output output)
Copyright © 2019. All rights reserved.