@@ -349,10 +349,10 @@ public final class Ops {
349
349
350
350
public final SignalOps signal ;
351
351
352
- public final QuantizationOps quantization ;
353
-
354
352
public final TrainOps train ;
355
353
354
+ public final QuantizationOps quantization ;
355
+
356
356
private final Scope scope ;
357
357
358
358
private Ops (Scope scope ) {
@@ -374,8 +374,8 @@ private Ops(Scope scope) {
374
374
math = new MathOps (this );
375
375
audio = new AudioOps (this );
376
376
signal = new SignalOps (this );
377
- quantization = new QuantizationOps (this );
378
377
train = new TrainOps (this );
378
+ quantization = new QuantizationOps (this );
379
379
}
380
380
381
381
/**
@@ -5905,51 +5905,46 @@ public <T extends TType> StopGradient<T> stopGradient(Operand<T> input) {
5905
5905
5906
5906
/**
5907
5907
* Return a strided slice from `input`.
5908
- * <p>
5909
- * The goal of this op is to produce a new tensor with a subset of
5910
- * the elements from the `n` dimensional `input` tensor. The subset is chosen using
5911
- * a sequence of `m` sparse range specifications encoded into the arguments
5912
- * of this function. Note, in some cases
5913
- * `m` could be equal to `n`, but this need not be the case. Each
5914
- * range specification entry can be one of the following:
5915
- * <p>
5916
- * - An ellipsis (...) using {@link Indices#ellipsis()}. Ellipses are used to imply zero or more
5917
- * dimensions of full-dimension selection and are produced using
5918
- * `ellipsis_mask`. For example, `foo[...]` is the identity slice.
5919
- * <p>
5920
- * - A new axis using {@link Indices#newAxis()}. This is used to insert a new shape=1 dimension and is
5921
- * produced using `new_axis_mask`. For example, `foo[:, ...]` where
5922
- * `foo` is shape `(3, 4)` produces a `(1, 3, 4)` tensor.
5923
- * <p>
5924
- * - A range `begin:end:stride` using {@link Indices#slice(Long, Long, long)} Index.slice()}. This is used to specify how much to choose from
5925
- * a given dimension. `stride` can be any integer but 0. `begin` is an integer
5926
- * which represents the index of the first value to select while `end` represents
5927
- * the index of the last value to select. The number of values selected in each
5928
- * dimension is `end - begin` if `stride > 0` and `begin - end` if `stride < 0`.
5929
- * `begin` and `end` can be negative where `-1` is the last element, `-2` is
5930
- * the second to last. `begin_mask` controls whether to replace the explicitly
5931
- * given `begin` with an implicit effective value of `0` if `stride > 0` and
5932
- * `-1` if `stride < 0`. `end_mask` is analogous but produces the number
5933
- * required to create the largest open interval. For example, given a shape
5934
- * `(3,)` tensor `foo[:]`, the effective `begin` and `end` are `0` and `3`. Do
5935
- * not assume this is equivalent to `foo[0:-1]` which has an effective `begin`
5936
- * and `end` of `0` and `2`. Another example is `foo[-2::-1]` which reverses the
5937
- * first dimension of a tensor while dropping the last two (in the original
5938
- * order elements). For example `foo = [1,2,3,4]; foo[-2::-1]` is `[4,3]`.
5939
- * <p>
5940
- * - A single index using {@link Indices#at(long)}. This is used to keep only elements that have a given
5941
- * index. For example (`foo[2, :]` on a shape `(5,6)` tensor produces a
5942
- * shape `(6,)` tensor. This is encoded in `begin` and `end` and
5943
- * `shrink_axis_mask`.
5944
- * <p>
5945
- *
5946
- * <i>Requirements</i>:
5947
- * `0 != strides[i] for i in [0, m)`
5948
- * Only one ellipsis.
5908
+ * <p>
5909
+ * The goal of this op is to produce a new tensor with a subset of the elements from the `n` dimensional `input`
5910
+ * tensor. The subset is chosen using a sequence of `m` sparse range specifications encoded into the arguments of this
5911
+ * function. Note, in some cases `m` could be equal to `n`, but this need not be the case. Each range specification
5912
+ * entry can be one of the following:
5913
+ * <p>
5914
+ * - An ellipsis (...) using {@link Indices#ellipsis()}. Ellipses are used to imply zero or more dimensions of
5915
+ * full-dimension selection. For example, {@code stridedSlice(foo, Indices.ellipsis()} is the identity slice.
5916
+ * <p>
5917
+ * - A new axis using {@link Indices#newAxis()}. This is used to insert a new shape=1 dimension.
5918
+ * For example, `{@code stridedSlice(foo, Indices.newAxis())} where {@code foo} is shape {@code (3, 4)}
5919
+ * produces a {@code (1, 3, 4)} tensor.
5920
+ * <p>
5921
+ * - A range {@code begin:end:stride} using {@link Indices#slice(Long, Long, long)} Index.slice()} or {@link Indices#all()}. This is used to specify
5922
+ * how much to choose from a given dimension. {@code stride} can be any integer but 0. {@code begin} is an integer which
5923
+ * represents the index of the first value to select while {@code end} represents the index of the last value to select
5924
+ * (exclusive). Begin and end can be null, in which case the index begins or ends at the beginning or end of the dimension,
5925
+ * respectively (reversed if stride is negative). When both are null, {@code slice()} is the same as {@code all()}.
5926
+ * The number of values selected in each dimension is {@code end - begin} if {@code stride > 0} and {@code begin - end}
5927
+ * if {@code stride < 0}. {@code begin} and {@code end} can be negative where {@code -1} is the last element, {@code -2}
5928
+ * is the second to last. For example, given a shape {@code (3,)} tensor {@code stridedSlice(foo, Indices.all())}, the
5929
+ * effective {@code begin} and {@code end} are {@code 0} and {@code 3}. Do not assume this is equivalent to
5930
+ * {@code stridedSlice(foo, Indices.slice(0, -1))} which has an effective {@code begin} and {@code end} of {@code 0} and
5931
+ * {@code 2}. Another example is {@code stridedSlice(foo, Indices.slice(-2, null, -1))} which reverses the first dimension
5932
+ * of a tensor while dropping the last two (in the original order elements). For example {@code foo = [1,2,3,4];
5933
+ * stridedSlice(foo, Indices.slice(-2, null, -1)} is {@code [4,3]}.
5934
+ * <p>
5935
+ * - A single index using {@link Indices#at(long)}. This is used to keep only elements that have a given index. For
5936
+ * example ({@code stridedSlice(foo, Indices.at(2))} on a shape {@code (5,6)} tensor produces a shape {@code (6,)} tensor.
5937
+ * The dimension can be kept with size one using {@link Indices#at(long, boolean)}.
5938
+ * <p>
5939
+ * These semantics generally follow NumPy's indexing semantics, which can be found here:
5940
+ * <a href="https://numpy.org/doc/stable/reference/arrays.indexing.html">https://numpy.org/doc/stable/reference/arrays.indexing.html</a>
5941
+ * <p>
5942
+ *
5943
+ * <i>Requirements</i>:
5944
+ * `0 != strides[i] for i in [0, m)` Only one ellipsis.
5949
5945
*
5950
5946
* @param scope current scope
5951
5947
* @param <T> data type for {@code output()} output
5952
- * @param input
5953
5948
* @param indices The indices to slice. See {@link Indices}.
5954
5949
* @return a new instance of StridedSlice
5955
5950
* @see Indices
@@ -6072,13 +6067,12 @@ public <T extends TType, U extends TNumber> StridedSlice<T> stridedSlice(Operand
6072
6067
6073
6068
/**
6074
6069
* Assign `value` to the sliced l-value reference of `ref`.
6075
- * <p>
6076
- * The values of `value` are assigned to the positions in the variable
6077
- * `ref` that are selected by the slice parameters. The slice parameters
6078
- * `begin`, `end`, `strides`, etc. work exactly as in `StridedSlice`.
6079
- * <p>
6080
- * NOTE this op currently does not support broadcasting and so `value`'s
6081
- * shape must be exactly the shape produced by the slice of `ref`.
6070
+ * <p>
6071
+ * The values of `value` are assigned to the positions in the variable `ref` that are selected by the slice
6072
+ * parameters. The slice parameters `begin`, `end`, `strides`, etc. work exactly as in `StridedSlice`.
6073
+ * <p>
6074
+ * NOTE this op currently does not support broadcasting and so `value`'s shape must be exactly the shape produced by
6075
+ * the slice of `ref`.
6082
6076
*
6083
6077
* @param <T> data type for {@code outputRef()} output
6084
6078
* @param scope current scope
0 commit comments