Skip to content

Commit a4b5556

Browse files
committed
Added sparse and fixed problem with longs.
1 parent e80b858 commit a4b5556

File tree

4 files changed

+731
-446
lines changed

4 files changed

+731
-446
lines changed

TorchSharp/Tensor/ITorchTensor.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,22 @@ public interface ITorchTensor<T> : IDisposable
1414

1515
string Device { get; }
1616

17-
ITorchTensor<T> Cpu();
18-
19-
ITorchTensor<T> Cuda();
20-
2117
Span<T> Data { get; }
2218

2319
T Item { get; }
2420

21+
bool IsSparse { get; }
22+
23+
bool IsVariable { get; }
24+
2525
long GetTensorDimension(int dim);
2626

2727
long GetTensorStride(int dim);
2828

29+
ITorchTensor<T> Cpu();
30+
31+
ITorchTensor<T> Cuda();
32+
2933
void Backward();
3034

3135
ITorchTensor<float> Grad();

0 commit comments

Comments
 (0)