dotnet / TorchSharp

A .NET library that provides access to the library that powers PyTorch.
MIT License
1.37k stars 177 forks source link

Ponder: Tensor type? #18

Closed migueldeicaza closed 4 years ago

migueldeicaza commented 5 years ago

Perhaps there should be a TorchSharp.Tensor type that proxies to the right storage tensor, with an abstract interface, so that people can write generic-ish code that deals with Tensors, rather than having different data types.

Bonus points - even better would be to have the Tensor not surface a Tensor<T>, as that would defeat the reusability at that point. This would have the downside that operations would have to dynamically check for type compatibility.

dsyme commented 4 years ago

We can close this, as there is a TorchTensor type?

interesaaat commented 4 years ago

I think that this issue was about adding generics to the Tensor type. I tried and failed miserably. I think we can close this if we think that generics are not necessary.

migueldeicaza commented 4 years ago

The work on @PartyDonk could have helped.