diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/AudioSpectrogram.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/AudioSpectrogram.java
index 6d53cfe0347..def97e77e47 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/AudioSpectrogram.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/AudioSpectrogram.java
@@ -29,69 +29,61 @@
/**
* Produces a visualization of audio data over time.
- *
* Spectrograms are a standard way of representing audio information as a series of
* slices of frequency information, one slice for each window of time. By joining
* these together into a sequence, they form a distinctive fingerprint of the sound
* over time.
- *
- * This op expects to receive audio data as an input, stored as floats in the range
+ *
This op expects to receive audio data as an input, stored as floats in the range
* -1 to 1, together with a window width in samples, and a stride specifying how
* far to move the window between slices. From this it generates a three
* dimensional output. The first dimension is for the channels in the input, so a
* stereo audio input would have two here for example. The second dimension is time,
* with successive frequency slices. The third dimension has an amplitude value for
* each frequency during that time slice.
- *
- * This means the layout when converted and saved as an image is rotated 90 degrees
+ *
This means the layout when converted and saved as an image is rotated 90 degrees
* clockwise from a typical spectrogram. Time is descending down the Y axis, and
* the frequency decreases from left to right.
- *
- * Each value in the result represents the square root of the sum of the real and
+ *
Each value in the result represents the square root of the sum of the real and
* imaginary parts of an FFT on the current window of samples. In this way, the
* lowest dimension represents the power of each frequency in the current window,
* and adjacent windows are concatenated in the next dimension.
- *
- * To get a more intuitive and visual look at what this operation does, you can run
+ *
To get a more intuitive and visual look at what this operation does, you can run
* tensorflow/examples/wav_to_spectrogram to read in an audio file and save out the
* resulting spectrogram as a PNG image.
*/
-@Operator(group = "audio")
+@Operator(
+ group = "audio"
+)
public final class AudioSpectrogram extends RawOp implements Operand {
-
/**
- * Optional attributes for {@link org.tensorflow.op.audio.AudioSpectrogram}
+ * The name of this op, as known by TensorFlow core engine
*/
- public static class Options {
-
- /**
- * @param magnitudeSquared Whether to return the squared magnitude or just the
- * magnitude. Using squared magnitude can avoid extra calculations.
- */
- public Options magnitudeSquared(Boolean magnitudeSquared) {
- this.magnitudeSquared = magnitudeSquared;
- return this;
- }
-
- private Boolean magnitudeSquared;
-
- private Options() {
- }
+ public static final String OP_NAME = "AudioSpectrogram";
+
+ private Output spectrogram;
+
+ private AudioSpectrogram(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ spectrogram = operation.output(outputIdx++);
}
-
+
/**
* Factory method to create a class wrapping a new AudioSpectrogram operation.
- *
+ *
* @param scope current scope
* @param input Float representation of audio data.
* @param windowSize How wide the input window is in samples. For the highest efficiency
* this should be a power of two, but other values are accepted.
* @param stride How widely apart the center of adjacent sample windows should be.
- * @param options carries optional attributes values
+ * @param options carries optional attribute values
* @return a new instance of AudioSpectrogram
*/
- @Endpoint(describeByClass = true)
- public static AudioSpectrogram create(Scope scope, Operand input, Long windowSize, Long stride, Options... options) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static AudioSpectrogram create(Scope scope, Operand input, Long windowSize,
+ Long stride, Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("AudioSpectrogram", scope.makeOpName("AudioSpectrogram"));
opBuilder.addInput(input.asOutput());
opBuilder = scope.apply(opBuilder);
@@ -106,35 +98,51 @@ public static AudioSpectrogram create(Scope scope, Operand input, Long
}
return new AudioSpectrogram(opBuilder.build());
}
-
+
/**
+ * Sets the magnitudeSquared option.
+ *
* @param magnitudeSquared Whether to return the squared magnitude or just the
* magnitude. Using squared magnitude can avoid extra calculations.
+ * @return this Options instance.
*/
public static Options magnitudeSquared(Boolean magnitudeSquared) {
return new Options().magnitudeSquared(magnitudeSquared);
}
-
+
/**
+ * Gets spectrogram.
* 3D representation of the audio frequencies as an image.
+ * @return spectrogram.
*/
public Output spectrogram() {
return spectrogram;
}
-
+
@Override
public Output asOutput() {
return spectrogram;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "AudioSpectrogram";
-
- private Output spectrogram;
-
- private AudioSpectrogram(Operation operation) {
- super(operation);
- int outputIdx = 0;
- spectrogram = operation.output(outputIdx++);
+
+ /**
+ * Optional attributes for {@link org.tensorflow.op.audio.AudioSpectrogram}
+ */
+ public static class Options {
+ private Boolean magnitudeSquared;
+
+ private Options() {
+ }
+
+ /**
+ * Sets the magnitudeSquared option.
+ *
+ * @param magnitudeSquared Whether to return the squared magnitude or just the
+ * magnitude. Using squared magnitude can avoid extra calculations.
+ * @return this Options instance.
+ */
+ public Options magnitudeSquared(Boolean magnitudeSquared) {
+ this.magnitudeSquared = magnitudeSquared;
+ return this;
+ }
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/DecodeWav.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/DecodeWav.java
index 09dfa3af31f..2d69fa63df2 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/DecodeWav.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/DecodeWav.java
@@ -31,62 +31,49 @@
/**
* Decode a 16-bit PCM WAV file to a float tensor.
- *
* The -32768 to 32767 signed 16-bit values will be scaled to -1.0 to 1.0 in float.
- *
- * When desired_channels is set, if the input contains fewer channels than this
+ *
When desired_channels is set, if the input contains fewer channels than this
* then the last channel will be duplicated to give the requested number, else if
* the input has more channels than requested then the additional channels will be
* ignored.
- *
- * If desired_samples is set, then the audio will be cropped or padded with zeroes
+ *
If desired_samples is set, then the audio will be cropped or padded with zeroes
* to the requested length.
- *
- * The first output contains a Tensor with the content of the audio samples. The
+ *
The first output contains a Tensor with the content of the audio samples. The
* lowest dimension will be the number of channels, and the second will be the
* number of samples. For example, a ten-sample-long stereo WAV file should give an
* output shape of [10, 2].
*/
-@Operator(group = "audio")
+@Operator(
+ group = "audio"
+)
public final class DecodeWav extends RawOp {
-
/**
- * Optional attributes for {@link org.tensorflow.op.audio.DecodeWav}
+ * The name of this op, as known by TensorFlow core engine
*/
- public static class Options {
-
- /**
- * @param desiredChannels Number of sample channels wanted.
- */
- public Options desiredChannels(Long desiredChannels) {
- this.desiredChannels = desiredChannels;
- return this;
- }
-
- /**
- * @param desiredSamples Length of audio requested.
- */
- public Options desiredSamples(Long desiredSamples) {
- this.desiredSamples = desiredSamples;
- return this;
- }
-
- private Long desiredChannels;
- private Long desiredSamples;
-
- private Options() {
- }
+ public static final String OP_NAME = "DecodeWav";
+
+ private Output audio;
+
+ private Output sampleRate;
+
+ private DecodeWav(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ audio = operation.output(outputIdx++);
+ sampleRate = operation.output(outputIdx++);
}
-
+
/**
* Factory method to create a class wrapping a new DecodeWav operation.
- *
+ *
* @param scope current scope
* @param contents The WAV-encoded audio, usually from a file.
- * @param options carries optional attributes values
+ * @param options carries optional attribute values
* @return a new instance of DecodeWav
*/
- @Endpoint(describeByClass = true)
+ @Endpoint(
+ describeByClass = true
+ )
public static DecodeWav create(Scope scope, Operand contents, Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("DecodeWav", scope.makeOpName("DecodeWav"));
opBuilder.addInput(contents.asOutput());
@@ -103,45 +90,76 @@ public static DecodeWav create(Scope scope, Operand contents, Options..
}
return new DecodeWav(opBuilder.build());
}
-
+
/**
+ * Sets the desiredChannels option.
+ *
* @param desiredChannels Number of sample channels wanted.
+ * @return this Options instance.
*/
public static Options desiredChannels(Long desiredChannels) {
return new Options().desiredChannels(desiredChannels);
}
-
+
/**
+ * Sets the desiredSamples option.
+ *
* @param desiredSamples Length of audio requested.
+ * @return this Options instance.
*/
public static Options desiredSamples(Long desiredSamples) {
return new Options().desiredSamples(desiredSamples);
}
-
+
/**
- * 2-D with shape `[length, channels]`.
+ * Gets audio.
+ * 2-D with shape {@code [length, channels]}.
+ * @return audio.
*/
public Output audio() {
return audio;
}
-
+
/**
+ * Gets sampleRate.
* Scalar holding the sample rate found in the WAV header.
+ * @return sampleRate.
*/
public Output sampleRate() {
return sampleRate;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "DecodeWav";
-
- private Output audio;
- private Output sampleRate;
-
- private DecodeWav(Operation operation) {
- super(operation);
- int outputIdx = 0;
- audio = operation.output(outputIdx++);
- sampleRate = operation.output(outputIdx++);
+
+ /**
+ * Optional attributes for {@link org.tensorflow.op.audio.DecodeWav}
+ */
+ public static class Options {
+ private Long desiredChannels;
+
+ private Long desiredSamples;
+
+ private Options() {
+ }
+
+ /**
+ * Sets the desiredChannels option.
+ *
+ * @param desiredChannels Number of sample channels wanted.
+ * @return this Options instance.
+ */
+ public Options desiredChannels(Long desiredChannels) {
+ this.desiredChannels = desiredChannels;
+ return this;
+ }
+
+ /**
+ * Sets the desiredSamples option.
+ *
+ * @param desiredSamples Length of audio requested.
+ * @return this Options instance.
+ */
+ public Options desiredSamples(Long desiredSamples) {
+ this.desiredSamples = desiredSamples;
+ return this;
+ }
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/EncodeWav.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/EncodeWav.java
index a1128280152..4eca7ec84fd 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/EncodeWav.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/EncodeWav.java
@@ -31,27 +31,41 @@
/**
* Encode audio data using the WAV file format.
- *
* This operation will generate a string suitable to be saved out to create a .wav
* audio file. It will be encoded in the 16-bit PCM format. It takes in float
* values in the range -1.0f to 1.0f, and any outside that value will be clamped to
* that range.
- *
- * `audio` is a 2-D float Tensor of shape `[length, channels]`.
- * `sample_rate` is a scalar Tensor holding the rate to use (e.g. 44100).
+ *
{@code audio} is a 2-D float Tensor of shape {@code [length, channels]}.
+ * {@code sample_rate} is a scalar Tensor holding the rate to use (e.g. 44100).
*/
-@Operator(group = "audio")
+@Operator(
+ group = "audio"
+)
public final class EncodeWav extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "EncodeWav";
+
+ private Output contents;
+
+ private EncodeWav(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ contents = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new EncodeWav operation.
- *
+ *
* @param scope current scope
- * @param audio 2-D with shape `[length, channels]`.
+ * @param audio 2-D with shape {@code [length, channels]}.
* @param sampleRate Scalar containing the sample frequency.
* @return a new instance of EncodeWav
*/
- @Endpoint(describeByClass = true)
+ @Endpoint(
+ describeByClass = true
+ )
public static EncodeWav create(Scope scope, Operand audio, Operand sampleRate) {
OperationBuilder opBuilder = scope.env().opBuilder("EncodeWav", scope.makeOpName("EncodeWav"));
opBuilder.addInput(audio.asOutput());
@@ -59,27 +73,18 @@ public static EncodeWav create(Scope scope, Operand audio, Operand contents() {
return contents;
}
-
+
@Override
public Output asOutput() {
return contents;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "EncodeWav";
-
- private Output contents;
-
- private EncodeWav(Operation operation) {
- super(operation);
- int outputIdx = 0;
- contents = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/Mfcc.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/Mfcc.java
index a7b618fd070..22ae99ad3c8 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/Mfcc.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/audio/Mfcc.java
@@ -30,7 +30,6 @@
/**
* Transforms a spectrogram into a form that's useful for speech recognition.
- *
* Mel Frequency Cepstral Coefficients are a way of representing audio data that's
* been effective as an input feature for machine learning. They are created by
* taking the spectrum of a spectrogram (a 'cepstrum'), and discarding some of the
@@ -38,69 +37,38 @@
* history in the speech recognition world, and https://en.wikipedia.org/wiki/Mel-frequency_cepstrum
* is a good resource to learn more.
*/
-@Operator(group = "audio")
+@Operator(
+ group = "audio"
+)
public final class Mfcc extends RawOp implements Operand {
-
/**
- * Optional attributes for {@link org.tensorflow.op.audio.Mfcc}
+ * The name of this op, as known by TensorFlow core engine
*/
- public static class Options {
-
- /**
- * @param upperFrequencyLimit The highest frequency to use when calculating the
- * ceptstrum.
- */
- public Options upperFrequencyLimit(Float upperFrequencyLimit) {
- this.upperFrequencyLimit = upperFrequencyLimit;
- return this;
- }
-
- /**
- * @param lowerFrequencyLimit The lowest frequency to use when calculating the
- * ceptstrum.
- */
- public Options lowerFrequencyLimit(Float lowerFrequencyLimit) {
- this.lowerFrequencyLimit = lowerFrequencyLimit;
- return this;
- }
-
- /**
- * @param filterbankChannelCount Resolution of the Mel bank used internally.
- */
- public Options filterbankChannelCount(Long filterbankChannelCount) {
- this.filterbankChannelCount = filterbankChannelCount;
- return this;
- }
-
- /**
- * @param dctCoefficientCount How many output channels to produce per time slice.
- */
- public Options dctCoefficientCount(Long dctCoefficientCount) {
- this.dctCoefficientCount = dctCoefficientCount;
- return this;
- }
-
- private Float upperFrequencyLimit;
- private Float lowerFrequencyLimit;
- private Long filterbankChannelCount;
- private Long dctCoefficientCount;
-
- private Options() {
- }
+ public static final String OP_NAME = "Mfcc";
+
+ private Output output;
+
+ private Mfcc(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ output = operation.output(outputIdx++);
}
-
+
/**
* Factory method to create a class wrapping a new Mfcc operation.
- *
+ *
* @param scope current scope
* @param spectrogram Typically produced by the Spectrogram op, with magnitude_squared
* set to true.
* @param sampleRate How many samples per second the source audio used.
- * @param options carries optional attributes values
+ * @param options carries optional attribute values
* @return a new instance of Mfcc
*/
- @Endpoint(describeByClass = true)
- public static Mfcc create(Scope scope, Operand spectrogram, Operand sampleRate, Options... options) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static Mfcc create(Scope scope, Operand spectrogram, Operand sampleRate,
+ Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("Mfcc", scope.makeOpName("Mfcc"));
opBuilder.addInput(spectrogram.asOutput());
opBuilder.addInput(sampleRate.asOutput());
@@ -123,56 +91,122 @@ public static Mfcc create(Scope scope, Operand spectrogram, Operand output() {
return output;
}
-
+
@Override
public Output asOutput() {
return output;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "Mfcc";
-
- private Output output;
-
- private Mfcc(Operation operation) {
- super(operation);
- int outputIdx = 0;
- output = operation.output(outputIdx++);
+
+ /**
+ * Optional attributes for {@link org.tensorflow.op.audio.Mfcc}
+ */
+ public static class Options {
+ private Float upperFrequencyLimit;
+
+ private Float lowerFrequencyLimit;
+
+ private Long filterbankChannelCount;
+
+ private Long dctCoefficientCount;
+
+ private Options() {
+ }
+
+ /**
+ * Sets the upperFrequencyLimit option.
+ *
+ * @param upperFrequencyLimit The highest frequency to use when calculating the
+ * ceptstrum.
+ * @return this Options instance.
+ */
+ public Options upperFrequencyLimit(Float upperFrequencyLimit) {
+ this.upperFrequencyLimit = upperFrequencyLimit;
+ return this;
+ }
+
+ /**
+ * Sets the lowerFrequencyLimit option.
+ *
+ * @param lowerFrequencyLimit The lowest frequency to use when calculating the
+ * ceptstrum.
+ * @return this Options instance.
+ */
+ public Options lowerFrequencyLimit(Float lowerFrequencyLimit) {
+ this.lowerFrequencyLimit = lowerFrequencyLimit;
+ return this;
+ }
+
+ /**
+ * Sets the filterbankChannelCount option.
+ *
+ * @param filterbankChannelCount Resolution of the Mel bank used internally.
+ * @return this Options instance.
+ */
+ public Options filterbankChannelCount(Long filterbankChannelCount) {
+ this.filterbankChannelCount = filterbankChannelCount;
+ return this;
+ }
+
+ /**
+ * Sets the dctCoefficientCount option.
+ *
+ * @param dctCoefficientCount How many output channels to produce per time slice.
+ * @return this Options instance.
+ */
+ public Options dctCoefficientCount(Long dctCoefficientCount) {
+ this.dctCoefficientCount = dctCoefficientCount;
+ return this;
+ }
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseAnd.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseAnd.java
index 86fad697878..4cfde6b7c7a 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseAnd.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseAnd.java
@@ -28,69 +28,75 @@
import org.tensorflow.types.family.TNumber;
/**
- * Elementwise computes the bitwise AND of `x` and `y`.
- *
- * The result will have those bits set, that are set in both `x` and `y`. The
- * computation is performed on the underlying representations of `x` and `y`.
- *
- * For example:
- *
{@code
+ * Elementwise computes the bitwise AND of {@code x} and {@code y}.
+ * The result will have those bits set, that are set in both {@code x} and {@code y}. The
+ * computation is performed on the underlying representations of {@code x} and {@code y}.
+ * For example:
+ *
* import tensorflow as tf
* from tensorflow.python.ops import bitwise_ops
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64,
* tf.uint8, tf.uint16, tf.uint32, tf.uint64]
- *
+ *
* for dtype in dtype_list:
* lhs = tf.constant([0, 5, 3, 14], dtype=dtype)
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
* exp = tf.constant([0, 0, 3, 10], dtype=tf.float32)
- *
+ *
* res = bitwise_ops.bitwise_and(lhs, rhs)
* tf.assert_equal(tf.cast(res, tf.float32), exp) # TRUE
- * }
- *
- *
- * @param data type for {@code z()} output
+ *
+ *
+ * @param data type for {@code z} output
*/
-@Operator(group = "bitwise")
+@Operator(
+ group = "bitwise"
+)
public final class BitwiseAnd extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "BitwiseAnd";
+
+ private Output z;
+
+ private BitwiseAnd(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ z = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new BitwiseAnd operation.
- *
+ *
* @param scope current scope
- * @param x
- * @param y
+ * @param x the x value
+ * @param y the y value
+ * @param data type for {@code BitwiseAnd} output and operands
* @return a new instance of BitwiseAnd
*/
- @Endpoint(describeByClass = true)
+ @Endpoint(
+ describeByClass = true
+ )
public static BitwiseAnd create(Scope scope, Operand x, Operand y) {
OperationBuilder opBuilder = scope.env().opBuilder("BitwiseAnd", scope.makeOpName("BitwiseAnd"));
opBuilder.addInput(x.asOutput());
opBuilder.addInput(y.asOutput());
opBuilder = scope.apply(opBuilder);
- return new BitwiseAnd(opBuilder.build());
+ return new BitwiseAnd<>(opBuilder.build());
}
-
+
/**
+ * Gets z.
+ *
+ * @return z.
*/
public Output z() {
return z;
}
-
+
@Override
public Output asOutput() {
return z;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "BitwiseAnd";
-
- private Output z;
-
- private BitwiseAnd(Operation operation) {
- super(operation);
- int outputIdx = 0;
- z = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseOr.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseOr.java
index cea0b766cfe..d8d0eb67edf 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseOr.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseOr.java
@@ -28,69 +28,75 @@
import org.tensorflow.types.family.TNumber;
/**
- * Elementwise computes the bitwise OR of `x` and `y`.
- *
- * The result will have those bits set, that are set in `x`, `y` or both. The
- * computation is performed on the underlying representations of `x` and `y`.
- *
- * For example:
- *
{@code
+ * Elementwise computes the bitwise OR of {@code x} and {@code y}.
+ * The result will have those bits set, that are set in {@code x}, {@code y} or both. The
+ * computation is performed on the underlying representations of {@code x} and {@code y}.
+ * For example:
+ *
* import tensorflow as tf
* from tensorflow.python.ops import bitwise_ops
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64,
* tf.uint8, tf.uint16, tf.uint32, tf.uint64]
- *
+ *
* for dtype in dtype_list:
* lhs = tf.constant([0, 5, 3, 14], dtype=dtype)
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
* exp = tf.constant([5, 5, 7, 15], dtype=tf.float32)
- *
+ *
* res = bitwise_ops.bitwise_or(lhs, rhs)
* tf.assert_equal(tf.cast(res, tf.float32), exp) # TRUE
- * }
- *
- *
- * @param data type for {@code z()} output
+ *
+ *
+ * @param data type for {@code z} output
*/
-@Operator(group = "bitwise")
+@Operator(
+ group = "bitwise"
+)
public final class BitwiseOr extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "BitwiseOr";
+
+ private Output z;
+
+ private BitwiseOr(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ z = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new BitwiseOr operation.
- *
+ *
* @param scope current scope
- * @param x
- * @param y
+ * @param x the x value
+ * @param y the y value
+ * @param data type for {@code BitwiseOr} output and operands
* @return a new instance of BitwiseOr
*/
- @Endpoint(describeByClass = true)
+ @Endpoint(
+ describeByClass = true
+ )
public static BitwiseOr create(Scope scope, Operand x, Operand y) {
OperationBuilder opBuilder = scope.env().opBuilder("BitwiseOr", scope.makeOpName("BitwiseOr"));
opBuilder.addInput(x.asOutput());
opBuilder.addInput(y.asOutput());
opBuilder = scope.apply(opBuilder);
- return new BitwiseOr(opBuilder.build());
+ return new BitwiseOr<>(opBuilder.build());
}
-
+
/**
+ * Gets z.
+ *
+ * @return z.
*/
public Output z() {
return z;
}
-
+
@Override
public Output asOutput() {
return z;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "BitwiseOr";
-
- private Output z;
-
- private BitwiseOr(Operation operation) {
- super(operation);
- int outputIdx = 0;
- z = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseXor.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseXor.java
index f209732bb5c..6749b9427dd 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseXor.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/BitwiseXor.java
@@ -28,69 +28,75 @@
import org.tensorflow.types.family.TNumber;
/**
- * Elementwise computes the bitwise XOR of `x` and `y`.
- *
- * The result will have those bits set, that are different in `x` and `y`. The
- * computation is performed on the underlying representations of `x` and `y`.
- *
- * For example:
- *
{@code
+ * Elementwise computes the bitwise XOR of {@code x} and {@code y}.
+ * The result will have those bits set, that are different in {@code x} and {@code y}. The
+ * computation is performed on the underlying representations of {@code x} and {@code y}.
+ * For example:
+ *
* import tensorflow as tf
* from tensorflow.python.ops import bitwise_ops
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64,
* tf.uint8, tf.uint16, tf.uint32, tf.uint64]
- *
+ *
* for dtype in dtype_list:
* lhs = tf.constant([0, 5, 3, 14], dtype=dtype)
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
* exp = tf.constant([5, 5, 4, 5], dtype=tf.float32)
- *
+ *
* res = bitwise_ops.bitwise_xor(lhs, rhs)
* tf.assert_equal(tf.cast(res, tf.float32), exp) # TRUE
- * }
- *
- *
- * @param data type for {@code z()} output
+ *
+ *
+ * @param data type for {@code z} output
*/
-@Operator(group = "bitwise")
+@Operator(
+ group = "bitwise"
+)
public final class BitwiseXor extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "BitwiseXor";
+
+ private Output z;
+
+ private BitwiseXor(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ z = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new BitwiseXor operation.
- *
+ *
* @param scope current scope
- * @param x
- * @param y
+ * @param x the x value
+ * @param y the y value
+ * @param data type for {@code BitwiseXor} output and operands
* @return a new instance of BitwiseXor
*/
- @Endpoint(describeByClass = true)
+ @Endpoint(
+ describeByClass = true
+ )
public static BitwiseXor create(Scope scope, Operand x, Operand y) {
OperationBuilder opBuilder = scope.env().opBuilder("BitwiseXor", scope.makeOpName("BitwiseXor"));
opBuilder.addInput(x.asOutput());
opBuilder.addInput(y.asOutput());
opBuilder = scope.apply(opBuilder);
- return new BitwiseXor(opBuilder.build());
+ return new BitwiseXor<>(opBuilder.build());
}
-
+
/**
+ * Gets z.
+ *
+ * @return z.
*/
public Output z() {
return z;
}
-
+
@Override
public Output asOutput() {
return z;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "BitwiseXor";
-
- private Output z;
-
- private BitwiseXor(Operation operation) {
- super(operation);
- int outputIdx = 0;
- z = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/Invert.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/Invert.java
index 4f4e063ed50..f3e64ead598 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/Invert.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/Invert.java
@@ -28,22 +28,20 @@
import org.tensorflow.types.family.TNumber;
/**
- * Invert (flip) each bit of supported types; for example, type `uint8` value 01010101 becomes 10101010.
- *
- * Flip each bit of supported types. For example, type `int8` (decimal 2) binary 00000010 becomes (decimal -3) binary 11111101.
- * This operation is performed on each element of the tensor argument `x`.
- *
- * Example:
- *
{@code
+ * Invert (flip) each bit of supported types; for example, type {@code uint8} value 01010101 becomes 10101010.
+ * Flip each bit of supported types. For example, type {@code int8} (decimal 2) binary 00000010 becomes (decimal -3) binary 11111101.
+ * This operation is performed on each element of the tensor argument {@code x}.
+ * Example:
+ *
* import tensorflow as tf
* from tensorflow.python.ops import bitwise_ops
- *
+ *
* # flip 2 (00000010) to -3 (11111101)
* tf.assert_equal(-3, bitwise_ops.invert(2))
- *
+ *
* dtype_list = [dtypes.int8, dtypes.int16, dtypes.int32, dtypes.int64,
* dtypes.uint8, dtypes.uint16, dtypes.uint32, dtypes.uint64]
- *
+ *
* inputs = [0, 5, 3, 14]
* for dtype in dtype_list:
* # Because of issues with negative numbers, let's test this indirectly.
@@ -56,60 +54,68 @@
* input_tensor, bitwise_ops.invert(input_tensor)),
* bitwise_ops.invert(
* tf.constant(0, dtype=dtype))]
- *
+ *
* expected = tf.constant([0, 0, 0, 0], dtype=tf.float32)
* tf.assert_equal(tf.cast(not_a_and_a, tf.float32), expected)
- *
+ *
* expected = tf.cast([not_0] * 4, tf.float32)
* tf.assert_equal(tf.cast(not_a_or_a, tf.float32), expected)
- *
+ *
* # For unsigned dtypes let's also check the result directly.
* if dtype.is_unsigned:
* inverted = bitwise_ops.invert(input_tensor)
* expected = tf.constant([dtype.max - x for x in inputs], dtype=tf.float32)
* tf.assert_equal(tf.cast(inverted, tf.float32), tf.cast(expected, tf.float32))
- * }
- *
- *
- * @param data type for {@code y()} output
+ *
+ *
+ * @param data type for {@code y} output
*/
-@Operator(group = "bitwise")
+@Operator(
+ group = "bitwise"
+)
public final class Invert extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "Invert";
+
+ private Output y;
+
+ private Invert(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ y = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new Invert operation.
- *
+ *
* @param scope current scope
- * @param x
+ * @param x the x value
+ * @param data type for {@code Invert} output and operands
* @return a new instance of Invert
*/
- @Endpoint(describeByClass = true)
+ @Endpoint(
+ describeByClass = true
+ )
public static Invert create(Scope scope, Operand x) {
OperationBuilder opBuilder = scope.env().opBuilder("Invert", scope.makeOpName("Invert"));
opBuilder.addInput(x.asOutput());
opBuilder = scope.apply(opBuilder);
- return new Invert(opBuilder.build());
+ return new Invert<>(opBuilder.build());
}
-
+
/**
+ * Gets y.
+ *
+ * @return y.
*/
public Output y() {
return y;
}
-
+
@Override
public Output asOutput() {
return y;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "Invert";
-
- private Output y;
-
- private Invert(Operation operation) {
- super(operation);
- int outputIdx = 0;
- y = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/LeftShift.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/LeftShift.java
index 98ca43ae889..ad6bfc18f5c 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/LeftShift.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/LeftShift.java
@@ -28,80 +28,86 @@
import org.tensorflow.types.family.TNumber;
/**
- * Elementwise computes the bitwise left-shift of `x` and `y`.
- *
- * If `y` is negative, or greater than or equal to the width of `x` in bits the
+ * Elementwise computes the bitwise left-shift of {@code x} and {@code y}.
+ * If {@code y} is negative, or greater than or equal to the width of {@code x} in bits the
* result is implementation defined.
- *
- * Example:
- *
{@code
+ * Example:
+ *
* import tensorflow as tf
* from tensorflow.python.ops import bitwise_ops
* import numpy as np
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64]
- *
+ *
* for dtype in dtype_list:
* lhs = tf.constant([-1, -5, -3, -14], dtype=dtype)
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
- *
+ *
* left_shift_result = bitwise_ops.left_shift(lhs, rhs)
- *
+ *
* print(left_shift_result)
- *
+ *
* # This will print:
* # tf.Tensor([ -32 -5 -128 0], shape=(4,), dtype=int8)
* # tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int16)
* # tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int32)
* # tf.Tensor([ -32 -5 -384 -28672], shape=(4,), dtype=int64)
- *
+ *
* lhs = np.array([-2, 64, 101, 32], dtype=np.int8)
* rhs = np.array([-1, -5, -3, -14], dtype=np.int8)
* bitwise_ops.left_shift(lhs, rhs)
- * #
- * }
- *
- *
- * @param data type for {@code z()} output
+ * # <tf.Tensor: shape=(4,), dtype=int8, numpy=array([ -2, 64, 101, 32], dtype=int8)>
+ *
+ *
+ * @param data type for {@code z} output
*/
-@Operator(group = "bitwise")
+@Operator(
+ group = "bitwise"
+)
public final class LeftShift extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "LeftShift";
+
+ private Output z;
+
+ private LeftShift(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ z = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new LeftShift operation.
- *
+ *
* @param scope current scope
- * @param x
- * @param y
+ * @param x the x value
+ * @param y the y value
+ * @param data type for {@code LeftShift} output and operands
* @return a new instance of LeftShift
*/
- @Endpoint(describeByClass = true)
+ @Endpoint(
+ describeByClass = true
+ )
public static LeftShift create(Scope scope, Operand x, Operand y) {
OperationBuilder opBuilder = scope.env().opBuilder("LeftShift", scope.makeOpName("LeftShift"));
opBuilder.addInput(x.asOutput());
opBuilder.addInput(y.asOutput());
opBuilder = scope.apply(opBuilder);
- return new LeftShift(opBuilder.build());
+ return new LeftShift<>(opBuilder.build());
}
-
+
/**
+ * Gets z.
+ *
+ * @return z.
*/
public Output z() {
return z;
}
-
+
@Override
public Output asOutput() {
return z;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "LeftShift";
-
- private Output z;
-
- private LeftShift(Operation operation) {
- super(operation);
- int outputIdx = 0;
- z = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/RightShift.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/RightShift.java
index 4d08a05bf1a..5660c65ea14 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/RightShift.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/bitwise/RightShift.java
@@ -28,83 +28,88 @@
import org.tensorflow.types.family.TNumber;
/**
- * Elementwise computes the bitwise right-shift of `x` and `y`.
- *
+ * Elementwise computes the bitwise right-shift of {@code x} and {@code y}.
* Performs a logical shift for unsigned integer types, and an arithmetic shift
* for signed integer types.
- *
- * If `y` is negative, or greater than or equal to than the width of `x` in bits
+ *
If {@code y} is negative, or greater than or equal to than the width of {@code x} in bits
* the result is implementation defined.
- *
- * Example:
- *
{@code
+ * Example:
+ *
* import tensorflow as tf
* from tensorflow.python.ops import bitwise_ops
* import numpy as np
* dtype_list = [tf.int8, tf.int16, tf.int32, tf.int64]
- *
+ *
* for dtype in dtype_list:
* lhs = tf.constant([-1, -5, -3, -14], dtype=dtype)
* rhs = tf.constant([5, 0, 7, 11], dtype=dtype)
- *
+ *
* right_shift_result = bitwise_ops.right_shift(lhs, rhs)
- *
+ *
* print(right_shift_result)
- *
+ *
* # This will print:
* # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int8)
* # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int16)
* # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int32)
* # tf.Tensor([-1 -5 -1 -1], shape=(4,), dtype=int64)
- *
+ *
* lhs = np.array([-2, 64, 101, 32], dtype=np.int8)
* rhs = np.array([-1, -5, -3, -14], dtype=np.int8)
* bitwise_ops.right_shift(lhs, rhs)
- * #
- * }
- *
- *
- * @param data type for {@code z()} output
+ * # <tf.Tensor: shape=(4,), dtype=int8, numpy=array([ -2, 64, 101, 32], dtype=int8)>
+ *
+ *
+ * @param data type for {@code z} output
*/
-@Operator(group = "bitwise")
+@Operator(
+ group = "bitwise"
+)
public final class RightShift extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "RightShift";
+
+ private Output z;
+
+ private RightShift(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ z = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new RightShift operation.
- *
+ *
* @param scope current scope
- * @param x
- * @param y
+ * @param x the x value
+ * @param y the y value
+ * @param data type for {@code RightShift} output and operands
* @return a new instance of RightShift
*/
- @Endpoint(describeByClass = true)
+ @Endpoint(
+ describeByClass = true
+ )
public static RightShift create(Scope scope, Operand x, Operand y) {
OperationBuilder opBuilder = scope.env().opBuilder("RightShift", scope.makeOpName("RightShift"));
opBuilder.addInput(x.asOutput());
opBuilder.addInput(y.asOutput());
opBuilder = scope.apply(opBuilder);
- return new RightShift(opBuilder.build());
+ return new RightShift<>(opBuilder.build());
}
-
+
/**
+ * Gets z.
+ *
+ * @return z.
*/
public Output z() {
return z;
}
-
+
@Override
public Output asOutput() {
return z;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "RightShift";
-
- private Output z;
-
- private RightShift(Operation operation) {
- super(operation);
- int outputIdx = 0;
- z = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/cluster/KMC2ChainInitialization.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/cluster/KMC2ChainInitialization.java
index 82e9b43cf61..b8cf65899ca 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/cluster/KMC2ChainInitialization.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/cluster/KMC2ChainInitialization.java
@@ -24,58 +24,62 @@
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
-import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.TFloat32;
import org.tensorflow.types.TInt64;
/**
* Returns the index of a data point that should be added to the seed set.
- *
* Entries in distances are assumed to be squared distances of candidate points to
* the already sampled centers in the seed set. The op constructs one Markov chain
* of the k-MC^2 algorithm and returns the index of one candidate point to be added
* as an additional cluster center.
*/
public final class KMC2ChainInitialization extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "KMC2ChainInitialization";
+
+ private Output index;
+
+ private KMC2ChainInitialization(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ index = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new KMC2ChainInitialization operation.
- *
+ *
* @param scope current scope
* @param distances Vector with squared distances to the closest previously sampled cluster center
* for each candidate point.
* @param seed Scalar. Seed for initializing the random number generator.
* @return a new instance of KMC2ChainInitialization
*/
- @Endpoint(describeByClass = true)
- public static KMC2ChainInitialization create(Scope scope, Operand distances, Operand seed) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static KMC2ChainInitialization create(Scope scope, Operand distances,
+ Operand seed) {
OperationBuilder opBuilder = scope.env().opBuilder("KMC2ChainInitialization", scope.makeOpName("KMC2ChainInitialization"));
opBuilder.addInput(distances.asOutput());
opBuilder.addInput(seed.asOutput());
opBuilder = scope.apply(opBuilder);
return new KMC2ChainInitialization(opBuilder.build());
}
-
+
/**
+ * Gets index.
* Scalar with the index of the sampled point.
+ * @return index.
*/
public Output index() {
return index;
}
-
+
@Override
public Output asOutput() {
return index;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "KMC2ChainInitialization";
-
- private Output index;
-
- private KMC2ChainInitialization(Operation operation) {
- super(operation);
- int outputIdx = 0;
- index = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/cluster/KmeansPlusPlusInitialization.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/cluster/KmeansPlusPlusInitialization.java
index cc163969960..79ebec34735 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/cluster/KmeansPlusPlusInitialization.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/cluster/KmeansPlusPlusInitialization.java
@@ -24,23 +24,33 @@
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
-import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.TFloat32;
import org.tensorflow.types.TInt64;
/**
* Selects num_to_sample rows of input using the KMeans++ criterion.
- *
* Rows of points are assumed to be input points. One row is selected at random.
* Subsequent rows are sampled with probability proportional to the squared L2
* distance from the nearest row selected thus far till num_to_sample rows have
* been sampled.
*/
public final class KmeansPlusPlusInitialization extends RawOp implements Operand {
-
+ /**
+ * The name of this op, as known by TensorFlow core engine
+ */
+ public static final String OP_NAME = "KmeansPlusPlusInitialization";
+
+ private Output samples;
+
+ private KmeansPlusPlusInitialization(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ samples = operation.output(outputIdx++);
+ }
+
/**
* Factory method to create a class wrapping a new KmeansPlusPlusInitialization operation.
- *
+ *
* @param scope current scope
* @param points Matrix of shape (n, d). Rows are assumed to be input points.
* @param numToSample Scalar. The number of rows to sample. This value must not be larger than n.
@@ -51,8 +61,11 @@ public final class KmeansPlusPlusInitialization extends RawOp implements Operand
* heuristic is used to sample O(log(num_to_sample)) additional points.
* @return a new instance of KmeansPlusPlusInitialization
*/
- @Endpoint(describeByClass = true)
- public static KmeansPlusPlusInitialization create(Scope scope, Operand points, Operand numToSample, Operand seed, Operand numRetriesPerSample) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static KmeansPlusPlusInitialization create(Scope scope, Operand points,
+ Operand numToSample, Operand seed, Operand numRetriesPerSample) {
OperationBuilder opBuilder = scope.env().opBuilder("KmeansPlusPlusInitialization", scope.makeOpName("KmeansPlusPlusInitialization"));
opBuilder.addInput(points.asOutput());
opBuilder.addInput(numToSample.asOutput());
@@ -61,27 +74,18 @@ public static KmeansPlusPlusInitialization create(Scope scope, Operand
opBuilder = scope.apply(opBuilder);
return new KmeansPlusPlusInitialization(opBuilder.build());
}
-
+
/**
+ * Gets samples.
* Matrix of shape (num_to_sample, d). The sampled rows.
+ * @return samples.
*/
public Output samples() {
return samples;
}
-
+
@Override
public Output asOutput() {
return samples;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "KmeansPlusPlusInitialization";
-
- private Output samples;
-
- private KmeansPlusPlusInitialization(Operation operation) {
- super(operation);
- int outputIdx = 0;
- samples = operation.output(outputIdx++);
- }
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/AllReduce.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/AllReduce.java
index 443ca7dfb98..f6eef64971b 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/AllReduce.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/AllReduce.java
@@ -17,6 +17,7 @@
package org.tensorflow.op.collective;
+import java.util.Arrays;
import java.util.List;
import org.tensorflow.Operand;
import org.tensorflow.Operation;
@@ -25,69 +26,51 @@
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
-import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.family.TNumber;
/**
* Mutually reduces multiple tensors of identical type and shape.
- *
- * @param data type for {@code data()} output
+ *
+ * @param data type for {@code data} output
+ *
+ * @deprecated use {@link org.tensorflow.op.collective.Reduce} instead
*/
+@Deprecated
public final class AllReduce extends RawOp implements Operand {
-
/**
- * Optional attributes for {@link org.tensorflow.op.collective.AllReduce}
+ * The name of this op, as known by TensorFlow core engine
*/
- public static class Options {
-
- /**
- * @param waitFor
- */
- public Options waitFor(List waitFor) {
- this.waitFor = waitFor;
- return this;
- }
-
- /**
- * @param communicationHint
- */
- public Options communicationHint(String communicationHint) {
- this.communicationHint = communicationHint;
- return this;
- }
-
- /**
- * @param timeoutSeconds
- */
- public Options timeoutSeconds(Float timeoutSeconds) {
- this.timeoutSeconds = timeoutSeconds;
- return this;
- }
-
- private List waitFor;
- private String communicationHint;
- private Float timeoutSeconds;
-
- private Options() {
- }
+ public static final String OP_NAME = "CollectiveReduce";
+
+ private Output data;
+
+ private AllReduce(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ data = operation.output(outputIdx++);
}
-
+
/**
- * Factory method to create a class wrapping a new AllReduce operation.
- *
+ * Factory method to create a class wrapping a new CollectiveReduce operation.
+ *
* @param scope current scope
- * @param input
- * @param groupSize
- * @param groupKey
- * @param instanceKey
- * @param mergeOp
- * @param finalOp
- * @param subdivOffsets
- * @param options carries optional attributes values
+ * @param input the input value
+ * @param groupSize the value of the groupSize property
+ * @param groupKey the value of the groupKey property
+ * @param instanceKey the value of the instanceKey property
+ * @param mergeOp the value of the mergeOp property
+ * @param finalOp the value of the finalOp property
+ * @param subdivOffsets the value of the subdivOffsets property
+ * @param options carries optional attribute values
+ * @param data type for {@code CollectiveReduce} output and operands
* @return a new instance of AllReduce
*/
- @Endpoint(describeByClass = true)
- public static AllReduce create(Scope scope, Operand input, Long groupSize, Long groupKey, Long instanceKey, String mergeOp, String finalOp, List subdivOffsets, Options... options) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static AllReduce create(Scope scope, Operand input,
+ Long groupSize, Long groupKey, Long instanceKey, String mergeOp, String finalOp,
+ List subdivOffsets, Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("CollectiveReduce", scope.makeOpName("AllReduce"));
opBuilder.addInput(input.asOutput());
opBuilder = scope.apply(opBuilder);
@@ -97,7 +80,7 @@ public static AllReduce create(Scope scope, Operand in
opBuilder.setAttr("merge_op", mergeOp);
opBuilder.setAttr("final_op", finalOp);
long[] subdivOffsetsArray = new long[subdivOffsets.size()];
- for (int i = 0; i < subdivOffsetsArray.length; ++i) {
+ for (int i = 0 ; i < subdivOffsetsArray.length ; i++) {
subdivOffsetsArray[i] = subdivOffsets.get(i);
}
opBuilder.setAttr("subdiv_offsets", subdivOffsetsArray);
@@ -105,7 +88,7 @@ public static AllReduce create(Scope scope, Operand in
for (Options opts : options) {
if (opts.waitFor != null) {
long[] waitForArray = new long[opts.waitFor.size()];
- for (int i = 0; i < waitForArray.length; ++i) {
+ for (int i = 0 ; i < waitForArray.length ; i++) {
waitForArray[i] = opts.waitFor.get(i);
}
opBuilder.setAttr("wait_for", waitForArray);
@@ -118,49 +101,118 @@ public static AllReduce create(Scope scope, Operand in
}
}
}
- return new AllReduce(opBuilder.build());
+ return new AllReduce<>(opBuilder.build());
}
-
+
/**
- * @param waitFor
+ * Sets the waitFor option.
+ *
+ * @param waitFor the waitFor option
+ * @return this Options instance.
*/
public static Options waitFor(List waitFor) {
return new Options().waitFor(waitFor);
}
-
+
/**
- * @param communicationHint
+ * Sets the waitFor option.
+ *
+ * @param waitFor the waitFor option
+ * @return this Options instance.
+ */
+ public static Options waitFor(Long[] waitFor) {
+ return new Options().waitFor(waitFor);
+ }
+
+ /**
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
*/
public static Options communicationHint(String communicationHint) {
return new Options().communicationHint(communicationHint);
}
-
+
/**
- * @param timeoutSeconds
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
*/
public static Options timeoutSeconds(Float timeoutSeconds) {
return new Options().timeoutSeconds(timeoutSeconds);
}
-
+
/**
+ * Gets data.
+ *
+ * @return data.
*/
public Output data() {
return data;
}
-
+
@Override
public Output asOutput() {
return data;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "CollectiveReduce";
-
- private Output data;
-
- private AllReduce(Operation operation) {
- super(operation);
- int outputIdx = 0;
- data = operation.output(outputIdx++);
+
+ /**
+ * Optional attributes for {@link org.tensorflow.op.collective.AllReduce}
+ */
+ public static class Options {
+ private List waitFor;
+
+ private String communicationHint;
+
+ private Float timeoutSeconds;
+
+ private Options() {
+ }
+
+ /**
+ * Sets the waitFor option.
+ *
+ * @param waitFor the waitFor option
+ * @return this Options instance.
+ */
+ public Options waitFor(List waitFor) {
+ this.waitFor = waitFor;
+ return this;
+ }
+
+ /**
+ * Sets the waitFor option.
+ *
+ * @param waitFor the waitFor option
+ * @return this Options instance.
+ */
+ public Options waitFor(Long... waitFor) {
+ this.waitFor = Arrays.asList(waitFor);
+ return this;
+ }
+
+ /**
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
+ */
+ public Options communicationHint(String communicationHint) {
+ this.communicationHint = communicationHint;
+ return this;
+ }
+
+ /**
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
+ */
+ public Options timeoutSeconds(Float timeoutSeconds) {
+ this.timeoutSeconds = timeoutSeconds;
+ return this;
+ }
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastRecv.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastRecv.java
index 4ade0cfc0a6..94999f5884f 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastRecv.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastRecv.java
@@ -26,58 +26,45 @@
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
-import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.family.TType;
/**
* Receives a tensor value broadcast from another device.
- *
- * @param data type for {@code data()} output
+ *
+ * @param data type for {@code data} output
*/
public final class BroadcastRecv extends RawOp implements Operand {
-
/**
- * Optional attributes for {@link org.tensorflow.op.collective.BroadcastRecv}
+ * The name of this op, as known by TensorFlow core engine
*/
- public static class Options {
-
- /**
- * @param communicationHint
- */
- public Options communicationHint(String communicationHint) {
- this.communicationHint = communicationHint;
- return this;
- }
-
- /**
- * @param timeoutSeconds
- */
- public Options timeoutSeconds(Float timeoutSeconds) {
- this.timeoutSeconds = timeoutSeconds;
- return this;
- }
-
- private String communicationHint;
- private Float timeoutSeconds;
-
- private Options() {
- }
+ public static final String OP_NAME = "CollectiveBcastRecv";
+
+ private Output data;
+
+ private BroadcastRecv(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ data = operation.output(outputIdx++);
}
-
+
/**
- * Factory method to create a class wrapping a new BroadcastRecv operation.
- *
+ * Factory method to create a class wrapping a new CollectiveBcastRecv operation.
+ *
* @param scope current scope
- * @param T
- * @param groupSize
- * @param groupKey
- * @param instanceKey
- * @param shape
- * @param options carries optional attributes values
+ * @param T the value of the T property
+ * @param groupSize the value of the groupSize property
+ * @param groupKey the value of the groupKey property
+ * @param instanceKey the value of the instanceKey property
+ * @param shape the value of the shape property
+ * @param options carries optional attribute values
+ * @param data type for {@code CollectiveBcastRecv} output and operands
* @return a new instance of BroadcastRecv
*/
- @Endpoint(describeByClass = true)
- public static BroadcastRecv create(Scope scope, Class T, Long groupSize, Long groupKey, Long instanceKey, Shape shape, Options... options) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static BroadcastRecv create(Scope scope, Class T, Long groupSize,
+ Long groupKey, Long instanceKey, Shape shape, Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("CollectiveBcastRecv", scope.makeOpName("BroadcastRecv"));
opBuilder = scope.apply(opBuilder);
opBuilder.setAttr("T", Operands.toDataType(T));
@@ -95,42 +82,74 @@ public static BroadcastRecv create(Scope scope, Class T,
}
}
}
- return new BroadcastRecv(opBuilder.build());
+ return new BroadcastRecv<>(opBuilder.build());
}
-
+
/**
- * @param communicationHint
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
*/
public static Options communicationHint(String communicationHint) {
return new Options().communicationHint(communicationHint);
}
-
+
/**
- * @param timeoutSeconds
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
*/
public static Options timeoutSeconds(Float timeoutSeconds) {
return new Options().timeoutSeconds(timeoutSeconds);
}
-
+
/**
+ * Gets data.
+ *
+ * @return data.
*/
public Output data() {
return data;
}
-
+
@Override
public Output asOutput() {
return data;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "CollectiveBcastRecv";
-
- private Output data;
-
- private BroadcastRecv(Operation operation) {
- super(operation);
- int outputIdx = 0;
- data = operation.output(outputIdx++);
+
+ /**
+ * Optional attributes for {@link org.tensorflow.op.collective.BroadcastRecv}
+ */
+ public static class Options {
+ private String communicationHint;
+
+ private Float timeoutSeconds;
+
+ private Options() {
+ }
+
+ /**
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
+ */
+ public Options communicationHint(String communicationHint) {
+ this.communicationHint = communicationHint;
+ return this;
+ }
+
+ /**
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
+ */
+ public Options timeoutSeconds(Float timeoutSeconds) {
+ this.timeoutSeconds = timeoutSeconds;
+ return this;
+ }
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastSend.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastSend.java
index 9a2646dc630..f2290763758 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastSend.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/BroadcastSend.java
@@ -25,58 +25,45 @@
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
-import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.family.TType;
/**
* Broadcasts a tensor value to one or more other devices.
- *
- * @param data type for {@code data()} output
+ *
+ * @param data type for {@code data} output
*/
public final class BroadcastSend extends RawOp implements Operand {
-
/**
- * Optional attributes for {@link org.tensorflow.op.collective.BroadcastSend}
+ * The name of this op, as known by TensorFlow core engine
*/
- public static class Options {
-
- /**
- * @param communicationHint
- */
- public Options communicationHint(String communicationHint) {
- this.communicationHint = communicationHint;
- return this;
- }
-
- /**
- * @param timeoutSeconds
- */
- public Options timeoutSeconds(Float timeoutSeconds) {
- this.timeoutSeconds = timeoutSeconds;
- return this;
- }
-
- private String communicationHint;
- private Float timeoutSeconds;
-
- private Options() {
- }
+ public static final String OP_NAME = "CollectiveBcastSend";
+
+ private Output data;
+
+ private BroadcastSend(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ data = operation.output(outputIdx++);
}
-
+
/**
- * Factory method to create a class wrapping a new BroadcastSend operation.
- *
+ * Factory method to create a class wrapping a new CollectiveBcastSend operation.
+ *
* @param scope current scope
- * @param input
- * @param groupSize
- * @param groupKey
- * @param instanceKey
- * @param shape
- * @param options carries optional attributes values
+ * @param input the input value
+ * @param groupSize the value of the groupSize property
+ * @param groupKey the value of the groupKey property
+ * @param instanceKey the value of the instanceKey property
+ * @param shape the value of the shape property
+ * @param options carries optional attribute values
+ * @param data type for {@code CollectiveBcastSend} output and operands
* @return a new instance of BroadcastSend
*/
- @Endpoint(describeByClass = true)
- public static BroadcastSend create(Scope scope, Operand input, Long groupSize, Long groupKey, Long instanceKey, Shape shape, Options... options) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static BroadcastSend create(Scope scope, Operand input,
+ Long groupSize, Long groupKey, Long instanceKey, Shape shape, Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("CollectiveBcastSend", scope.makeOpName("BroadcastSend"));
opBuilder.addInput(input.asOutput());
opBuilder = scope.apply(opBuilder);
@@ -94,42 +81,74 @@ public static BroadcastSend create(Scope scope, Operand
}
}
}
- return new BroadcastSend(opBuilder.build());
+ return new BroadcastSend<>(opBuilder.build());
}
-
+
/**
- * @param communicationHint
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
*/
public static Options communicationHint(String communicationHint) {
return new Options().communicationHint(communicationHint);
}
-
+
/**
- * @param timeoutSeconds
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
*/
public static Options timeoutSeconds(Float timeoutSeconds) {
return new Options().timeoutSeconds(timeoutSeconds);
}
-
+
/**
+ * Gets data.
+ *
+ * @return data.
*/
public Output data() {
return data;
}
-
+
@Override
public Output asOutput() {
return data;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "CollectiveBcastSend";
-
- private Output data;
-
- private BroadcastSend(Operation operation) {
- super(operation);
- int outputIdx = 0;
- data = operation.output(outputIdx++);
+
+ /**
+ * Optional attributes for {@link org.tensorflow.op.collective.BroadcastSend}
+ */
+ public static class Options {
+ private String communicationHint;
+
+ private Float timeoutSeconds;
+
+ private Options() {
+ }
+
+ /**
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
+ */
+ public Options communicationHint(String communicationHint) {
+ this.communicationHint = communicationHint;
+ return this;
+ }
+
+ /**
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
+ */
+ public Options timeoutSeconds(Float timeoutSeconds) {
+ this.timeoutSeconds = timeoutSeconds;
+ return this;
+ }
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/Gather.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/Gather.java
index be698afc2e7..8d8f7cc3cbb 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/Gather.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/Gather.java
@@ -25,58 +25,45 @@
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
-import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.family.TNumber;
/**
* Mutually accumulates multiple tensors of identical type and shape.
- *
- * @param data type for {@code data()} output
+ *
+ * @param data type for {@code data} output
*/
public final class Gather extends RawOp implements Operand {
-
/**
- * Optional attributes for {@link org.tensorflow.op.collective.Gather}
+ * The name of this op, as known by TensorFlow core engine
*/
- public static class Options {
-
- /**
- * @param communicationHint
- */
- public Options communicationHint(String communicationHint) {
- this.communicationHint = communicationHint;
- return this;
- }
-
- /**
- * @param timeoutSeconds
- */
- public Options timeoutSeconds(Float timeoutSeconds) {
- this.timeoutSeconds = timeoutSeconds;
- return this;
- }
-
- private String communicationHint;
- private Float timeoutSeconds;
-
- private Options() {
- }
+ public static final String OP_NAME = "CollectiveGather";
+
+ private Output data;
+
+ private Gather(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ data = operation.output(outputIdx++);
}
-
+
/**
- * Factory method to create a class wrapping a new Gather operation.
- *
+ * Factory method to create a class wrapping a new CollectiveGather operation.
+ *
* @param scope current scope
- * @param input
- * @param groupSize
- * @param groupKey
- * @param instanceKey
- * @param shape
- * @param options carries optional attributes values
+ * @param input the input value
+ * @param groupSize the value of the groupSize property
+ * @param groupKey the value of the groupKey property
+ * @param instanceKey the value of the instanceKey property
+ * @param shape the value of the shape property
+ * @param options carries optional attribute values
+ * @param data type for {@code CollectiveGather} output and operands
* @return a new instance of Gather
*/
- @Endpoint(describeByClass = true)
- public static Gather create(Scope scope, Operand input, Long groupSize, Long groupKey, Long instanceKey, Shape shape, Options... options) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static Gather create(Scope scope, Operand input, Long groupSize,
+ Long groupKey, Long instanceKey, Shape shape, Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("CollectiveGather", scope.makeOpName("Gather"));
opBuilder.addInput(input.asOutput());
opBuilder = scope.apply(opBuilder);
@@ -94,42 +81,74 @@ public static Gather create(Scope scope, Operand input
}
}
}
- return new Gather(opBuilder.build());
+ return new Gather<>(opBuilder.build());
}
-
+
/**
- * @param communicationHint
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
*/
public static Options communicationHint(String communicationHint) {
return new Options().communicationHint(communicationHint);
}
-
+
/**
- * @param timeoutSeconds
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
*/
public static Options timeoutSeconds(Float timeoutSeconds) {
return new Options().timeoutSeconds(timeoutSeconds);
}
-
+
/**
+ * Gets data.
+ *
+ * @return data.
*/
public Output data() {
return data;
}
-
+
@Override
public Output asOutput() {
return data;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "CollectiveGather";
-
- private Output data;
-
- private Gather(Operation operation) {
- super(operation);
- int outputIdx = 0;
- data = operation.output(outputIdx++);
+
+ /**
+ * Optional attributes for {@link org.tensorflow.op.collective.Gather}
+ */
+ public static class Options {
+ private String communicationHint;
+
+ private Float timeoutSeconds;
+
+ private Options() {
+ }
+
+ /**
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
+ */
+ public Options communicationHint(String communicationHint) {
+ this.communicationHint = communicationHint;
+ return this;
+ }
+
+ /**
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
+ */
+ public Options timeoutSeconds(Float timeoutSeconds) {
+ this.timeoutSeconds = timeoutSeconds;
+ return this;
+ }
}
}
diff --git a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/GatherV2.java b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/GatherV2.java
index 0b90160e904..aaeee6f00f8 100644
--- a/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/GatherV2.java
+++ b/tensorflow-core/tensorflow-core-api/src/gen/java/org/tensorflow/op/collective/GatherV2.java
@@ -24,58 +24,46 @@
import org.tensorflow.op.RawOp;
import org.tensorflow.op.Scope;
import org.tensorflow.op.annotation.Endpoint;
-import org.tensorflow.op.annotation.Operator;
import org.tensorflow.types.TInt32;
import org.tensorflow.types.family.TNumber;
/**
* Mutually accumulates multiple tensors of identical type and shape.
- *
- * @param data type for {@code data()} output
+ *
+ * @param data type for {@code data} output
*/
public final class GatherV2 extends RawOp implements Operand {
-
/**
- * Optional attributes for {@link org.tensorflow.op.collective.GatherV2}
+ * The name of this op, as known by TensorFlow core engine
*/
- public static class Options {
-
- /**
- * @param communicationHint
- */
- public Options communicationHint(String communicationHint) {
- this.communicationHint = communicationHint;
- return this;
- }
-
- /**
- * @param timeoutSeconds
- */
- public Options timeoutSeconds(Float timeoutSeconds) {
- this.timeoutSeconds = timeoutSeconds;
- return this;
- }
-
- private String communicationHint;
- private Float timeoutSeconds;
-
- private Options() {
- }
+ public static final String OP_NAME = "CollectiveGatherV2";
+
+ private Output data;
+
+ private GatherV2(Operation operation) {
+ super(operation);
+ int outputIdx = 0;
+ data = operation.output(outputIdx++);
}
-
+
/**
- * Factory method to create a class wrapping a new GatherV2 operation.
- *
+ * Factory method to create a class wrapping a new CollectiveGatherV2 operation.
+ *
* @param scope current scope
- * @param input
- * @param groupSize
- * @param groupKey
- * @param instanceKey
- * @param options carries optional attributes values
+ * @param input the input value
+ * @param groupSize the groupSize value
+ * @param groupKey the groupKey value
+ * @param instanceKey the instanceKey value
+ * @param options carries optional attribute values
+ * @param data type for {@code CollectiveGatherV2} output and operands
* @return a new instance of GatherV2
*/
- @Endpoint(describeByClass = true)
- public static GatherV2 create(Scope scope, Operand input, Operand groupSize, Operand groupKey, Operand instanceKey, Options... options) {
+ @Endpoint(
+ describeByClass = true
+ )
+ public static GatherV2 create(Scope scope, Operand input,
+ Operand groupSize, Operand groupKey, Operand instanceKey,
+ Options... options) {
OperationBuilder opBuilder = scope.env().opBuilder("CollectiveGatherV2", scope.makeOpName("GatherV2"));
opBuilder.addInput(input.asOutput());
opBuilder.addInput(groupSize.asOutput());
@@ -92,42 +80,74 @@ public static GatherV2 create(Scope scope, Operand inp
}
}
}
- return new GatherV2(opBuilder.build());
+ return new GatherV2<>(opBuilder.build());
}
-
+
/**
- * @param communicationHint
+ * Sets the communicationHint option.
+ *
+ * @param communicationHint the communicationHint option
+ * @return this Options instance.
*/
public static Options communicationHint(String communicationHint) {
return new Options().communicationHint(communicationHint);
}
-
+
/**
- * @param timeoutSeconds
+ * Sets the timeoutSeconds option.
+ *
+ * @param timeoutSeconds the timeoutSeconds option
+ * @return this Options instance.
*/
public static Options timeoutSeconds(Float timeoutSeconds) {
return new Options().timeoutSeconds(timeoutSeconds);
}
-
+
/**
+ * Gets data.
+ *
+ * @return data.
*/
public Output data() {
return data;
}
-
+
@Override
public Output asOutput() {
return data;
}
-
- /** The name of this op, as known by TensorFlow core engine */
- public static final String OP_NAME = "CollectiveGatherV2";
-
- private Output