@Namespace(value="tensorflow::ops") @NoOffset public static class tensorflow.SparseCross extends Pointer
SparseTensor and one of 2D Tensor, each
representing features of one feature column. It outputs a 2D SparseTensor with
the batchwise crosses of these features.
For example, if the inputs are
inputs[0]: SparseTensor with shape = [2, 2]
[0, 0]: "a"
[1, 0]: "b"
[1, 1]: "c"
inputs[1]: SparseTensor with shape = [2, 1]
[0, 0]: "d"
[1, 0]: "e"
inputs[2]: Tensor [["f"], ["g"]]
then the output will be
shape = [2, 2]
[0, 0]: "a_X_d_X_f"
[1, 0]: "b_X_e_X_g"
[1, 1]: "c_X_e_X_g"
if hashed_output=true then the output will be
shape = [2, 2]
[0, 0]: FingerprintCat64(
Fingerprint64("f"), FingerprintCat64(
Fingerprint64("d"), Fingerprint64("a")))
[1, 0]: FingerprintCat64(
Fingerprint64("g"), FingerprintCat64(
Fingerprint64("e"), Fingerprint64("b")))
[1, 1]: FingerprintCat64(
Fingerprint64("g"), FingerprintCat64(
Fingerprint64("e"), Fingerprint64("c")))
Arguments:
* scope: A Scope object
* indices: 2-D. Indices of each input SparseTensor.
* values: 1-D. values of each SparseTensor.
* shapes: 1-D. Shapes of each SparseTensor.
* dense_inputs: 2-D. Columns represented by dense Tensor.
* hashed_output: If true, returns the hash of the cross instead of the string.
This will allow us avoiding string manipulations.
* num_buckets: It is used if hashed_output is true.
output = hashed_value%num_buckets if num_buckets > 0 else hashed_value.
* hash_key: Specify the hash_key that will be used by the FingerprintCat64
function to combine the crosses fingerprints.
Returns:
* Output output_indices: 2-D. Indices of the concatenated SparseTensor.
* Output output_values: 1-D. Non-empty values of the concatenated or hashed
SparseTensor.
* Output output_shape: 1-D. Shape of the concatenated SparseTensor.Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator| Constructor and Description |
|---|
SparseCross(Pointer p)
Pointer cast constructor.
|
SparseCross(tensorflow.Scope scope,
tensorflow.InputList indices,
tensorflow.InputList values,
tensorflow.InputList shapes,
tensorflow.InputList dense_inputs,
boolean hashed_output,
long num_buckets,
long hash_key,
int out_type,
int internal_type) |
| Modifier and Type | Method and Description |
|---|---|
tensorflow.Operation |
operation() |
tensorflow.SparseCross |
operation(tensorflow.Operation operation) |
tensorflow.Output |
output_indices() |
tensorflow.SparseCross |
output_indices(tensorflow.Output output_indices) |
tensorflow.Output |
output_shape() |
tensorflow.SparseCross |
output_shape(tensorflow.Output output_shape) |
tensorflow.Output |
output_values() |
tensorflow.SparseCross |
output_values(tensorflow.Output output_values) |
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 SparseCross(Pointer p)
Pointer.Pointer(Pointer).public SparseCross(@Const @ByRef tensorflow.Scope scope, @ByVal tensorflow.InputList indices, @ByVal tensorflow.InputList values, @ByVal tensorflow.InputList shapes, @ByVal tensorflow.InputList dense_inputs, @Cast(value="bool") boolean hashed_output, @Cast(value="tensorflow::int64") long num_buckets, @Cast(value="tensorflow::int64") long hash_key, @Cast(value="tensorflow::DataType") int out_type, @Cast(value="tensorflow::DataType") int internal_type)
@ByRef public tensorflow.Operation operation()
public tensorflow.SparseCross operation(tensorflow.Operation operation)
@ByRef public tensorflow.Output output_indices()
public tensorflow.SparseCross output_indices(tensorflow.Output output_indices)
@ByRef public tensorflow.Output output_values()
public tensorflow.SparseCross output_values(tensorflow.Output output_values)
@ByRef public tensorflow.Output output_shape()
public tensorflow.SparseCross output_shape(tensorflow.Output output_shape)
Copyright © 2019. All rights reserved.