Skip to content

Commit 46d75ef

Browse files
Merge branch 'main' into lang
2 parents 7f753ed + bb3042a commit 46d75ef

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

RELEASENOTES.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
## TorchSharp Release Notes
22

33
Releases, starting with 9/2/2021, are listed with the most recent release at the top.
4+
5+
# NuGet Version 0.102.4
6+
7+
__API Changes__:
8+
9+
#1284 make `torch.unique` and `torch.unique_consecutive` public.<br/>
10+
411
# NuGet Version 0.102.3
512

613
__Breaking Changes__:

src/TorchSharp/Tensor/torch.ReductionOps.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,12 +410,18 @@ [Pure]public static (Tensor std, Tensor mean) std_mean(Tensor input, (long, long
410410
[Pure]public static Tensor sum(Tensor input, long dim, bool keepdim = false, ScalarType? type = null) => input.sum(dim, keepdim, type);
411411

412412
// https://pytorch.org/docs/stable/generated/torch.unique
413-
[Pure]static (Tensor output, Tensor? inverse_indices, Tensor? counts) unique(
413+
/// <summary>
414+
/// Returns the unique elements of the input tensor.
415+
/// </summary>
416+
[Pure]public static (Tensor output, Tensor? inverse_indices, Tensor? counts) unique(
414417
Tensor input, bool sorted = true, bool return_inverse = false, bool return_counts = false, int? dim = null)
415418
=> input.unique(sorted, return_inverse, return_counts, dim);
416419

417420
// https://pytorch.org/docs/stable/generated/torch.unique_consecutive
418-
[Pure]static (Tensor output, Tensor? inverse_indices, Tensor? counts) unique_consecutive(
421+
/// <summary>
422+
/// Eliminates all but the first element from every consecutive group of equivalent elements.
423+
/// </summary>
424+
[Pure]public static (Tensor output, Tensor? inverse_indices, Tensor? counts) unique_consecutive(
419425
Tensor input, bool return_inverse = false, bool return_counts = false, int? dim = null)
420426
=> input.unique_consecutive(return_inverse, return_counts, dim);
421427

0 commit comments

Comments
 (0)