You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -32,7 +32,7 @@ public partial class Tensor : IDisposeScopeClient
32
32
staticlong_totalCount=0;
33
33
staticlong_peakCount=0;
34
34
35
-
publicDisposeScope?OwningDisposeScope{get;set;}
35
+
internalDisposeScope?OwningDisposeScope{get;set;}
36
36
37
37
internalTensor(IntPtrhandle)
38
38
{
@@ -417,7 +417,7 @@ public void WriteBytesToStream(Stream stream, int bufferSize = 1024)
417
417
_validate(0);
418
418
419
419
longtotalSize=NumberOfElements*ElementSize;
420
-
420
+
421
421
unsafe {
422
422
varptr=NativeMethods.THSTensor_data(handle);
423
423
if(ptr==IntPtr.Zero){CheckForErrors();}
@@ -451,7 +451,7 @@ public void ReadBytesFromStream(Stream stream, int bufferSize = 1024)
451
451
longtotalSize=NumberOfElements*ElementSize;
452
452
453
453
// Validate that this tensor matches the conditions for reading the bytes - pass 0 as total size
454
-
// since we don't need to check that condition.
454
+
// since we don't need to check that condition.
455
455
_validate(0);
456
456
457
457
unsafe {
@@ -471,7 +471,7 @@ public void ReadBytesFromStream(Stream stream, int bufferSize = 1024)
471
471
// Copy the contents over to the span
472
472
varspan=newSpan<byte>((void*)ptr,bytesRead);
473
473
buffer.AsSpan(0,bytesRead).CopyTo(span);
474
-
474
+
475
475
// Increment our pointer and decrease the total size of elements we have to write
476
476
ptr+=bytesRead;
477
477
totalSize-=bytesRead;
@@ -793,7 +793,7 @@ public Tensor mps(bool non_blocking = false)
793
793
returnnewTensor(res);
794
794
795
795
}
796
-
796
+
797
797
/// <summary>
798
798
/// Returns a copy of this object in CUDA memory.
799
799
/// If this object is already in CUDA memory and on the correct device, then no copy is performed and the original object is returned.
@@ -3277,14 +3277,14 @@ public Tensor trace()
3277
3277
/// <summary>
3278
3278
/// Creates a tensor whose diagonals of certain 2D planes (specified by dim1 and dim2) are filled by input.
3279
3279
/// To facilitate creating batched diagonal matrices, the 2D planes formed by the last two dimensions of the returned tensor are chosen by default.
3280
-
///
3280
+
///
3281
3281
/// The argument offset controls which diagonal to consider:
3282
3282
/// If offset is equal to 0, it is the main diagonal.
3283
3283
/// If offset is greater than 0, it is above the main diagonal.
3284
3284
/// If offset is less than 0, it is below the main diagonal.
3285
-
///
3285
+
///
3286
3286
/// The size of the new matrix will be calculated to make the specified diagonal of the size of the last input dimension.Note that for offset other than 0,
3287
-
///
3287
+
///
3288
3288
/// the order of dim1 and dim2 matters.Exchanging them is equivalent to changing the sign of offset.
3289
3289
/// </summary>
3290
3290
/// <param name="offset">Which diagonal to consider.</param>
@@ -3354,7 +3354,7 @@ public Tensor erf()
3354
3354
publicTensorerf_()
3355
3355
{
3356
3356
NativeMethods.THSTensor_erf_(Handle);
3357
-
CheckForErrors();
3357
+
CheckForErrors();
3358
3358
returnthis;
3359
3359
}
3360
3360
@@ -3438,7 +3438,6 @@ public Tensor eq_(Scalar target)
0 commit comments