Skip to content

Commit aa2d2c5

Browse files
Merge branch 'main' into 1279
2 parents f394e11 + 7ef79ff commit aa2d2c5

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

RELEASENOTES.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ Releases, starting with 9/2/2021, are listed with the most recent release at the
66

77
__Breaking Changes__:
88

9-
Correct `torch.finfo`. (`torch.set_default_dtype`, `Categorical.entropy`, `_CorrCholesky.check`, `Distribution.ClampProbs`, `FisherSnedecor.rsample`, `Gamma.rsample`, `Geometric.rsample`, `distributions.Gumbel`, `Laplace.rsample`, `SigmoidTransform._call` and `SigmoidTransform._inverse` are influenced.)
9+
Correct `torch.finfo`. (`torch.set_default_dtype`, `Categorical.entropy`, `_CorrCholesky.check`, `Distribution.ClampProbs`, `FisherSnedecor.rsample`, `Gamma.rsample`, `Geometric.rsample`, `distributions.Gumbel`, `Laplace.rsample`, `SigmoidTransform._call` and `SigmoidTransform._inverse` are influenced.)<br/>
10+
11+
__API Changes__:
12+
13+
#1284 make `torch.unique` and `torch.unique_consecutive` public.<br/>
1014

1115
# NuGet Version 0.102.3
1216

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

test/TorchSharpTest/TorchSharpTest.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<UseStyleCopAnalyzer>false</UseStyleCopAnalyzer>
1313
<VSTestLogger>trx</VSTestLogger>
1414
<VSTestResultsDirectory>$(OutputPath)</VSTestResultsDirectory>
15-
<LangVersion>latest</LangVersion>
15+
<LangVersion>10.0</LangVersion>
1616
</PropertyGroup>
1717

1818
<ItemGroup>

0 commit comments

Comments
 (0)