@Namespace(value="tensorflow::ops") @NoOffset @Properties(inherit=tensorflow.class) public class HistogramFixedWidth extends Pointer
values
, this operation returns a rank 1 histogram counting
the number of entries in values
that fall into every bin. The bins are
equal width and determined by the arguments value_range
and nbins
.
python
# Bins will be: (-inf, 1), [1, 2), [2, 3), [3, 4), [4, inf)
nbins = 5
value_range = [0.0, 5.0]
new_values = [-1.0, 0.0, 1.5, 2.0, 5.0, 15]
with tf.get_default_session() as sess:
hist = tf.histogram_fixed_width(new_values, value_range, nbins=5)
variables.global_variables_initializer().run()
sess.run(hist) => [2, 1, 1, 0, 2]
Arguments:
* scope: A Scope object
* values: Numeric Tensor
.
* value_range: Shape [2] Tensor
of same dtype
as values
.
values <= value_range[0] will be mapped to hist[0],
values >= value_range[1] will be mapped to hist[-1].
* nbins: Scalar int32 Tensor
. Number of histogram bins.
Returns:
* Output
: A 1-D Tensor
holding histogram of values.Modifier and Type | Class and Description |
---|---|
static class |
HistogramFixedWidth.Attrs
Optional attribute setters for HistogramFixedWidth
|
Pointer.CustomDeallocator, Pointer.Deallocator, Pointer.NativeDeallocator, Pointer.ReferenceCounter
Constructor and Description |
---|
HistogramFixedWidth(Pointer p)
Pointer cast constructor.
|
HistogramFixedWidth(Scope scope,
Input values,
Input value_range,
Input nbins) |
HistogramFixedWidth(Scope scope,
Input values,
Input value_range,
Input nbins,
HistogramFixedWidth.Attrs attrs) |
Modifier and Type | Method and Description |
---|---|
Input |
asInput() |
Output |
asOutput() |
static HistogramFixedWidth.Attrs |
Dtype(int x) |
Node |
node() |
Operation |
operation() |
HistogramFixedWidth |
operation(Operation setter) |
Output |
out() |
HistogramFixedWidth |
out(Output setter) |
address, asBuffer, asByteBuffer, availablePhysicalBytes, calloc, capacity, capacity, close, deallocate, deallocate, deallocateReferences, deallocator, deallocator, equals, fill, formatBytes, free, getDirectBufferAddress, getPointer, getPointer, getPointer, getPointer, hashCode, interruptDeallocatorThread, isNull, isNull, limit, limit, malloc, maxBytes, maxPhysicalBytes, memchr, memcmp, memcpy, memmove, memset, offsetAddress, offsetof, offsetof, parseBytes, physicalBytes, physicalBytesInaccurate, position, position, put, realloc, referenceCount, releaseReference, retainReference, setNull, sizeof, sizeof, toString, totalBytes, totalCount, totalPhysicalBytes, withDeallocator, zero
public HistogramFixedWidth(Pointer p)
Pointer(Pointer)
.public HistogramFixedWidth(@Const @ByRef Scope scope, @ByVal Input values, @ByVal Input value_range, @ByVal Input nbins)
public Node node()
@ByVal public static HistogramFixedWidth.Attrs Dtype(@Cast(value="tensorflow::DataType") int x)
public HistogramFixedWidth operation(Operation setter)
public HistogramFixedWidth out(Output setter)
Copyright © 2022. All rights reserved.