Comments (13)
We could reactive the KerasSharp, wrap the TorchSharp and TensorFlow.NET or TensorFlowSharp, ML.NET and CNTK.
from torchsharp.
I personally believe that we should stay closer to C# conventions instead of exactly mirroring the python API. The goal of the project is in fact to provide a way for C# users to run and build deep learning models through PyTorch, and not the other way around (i.e., PyTorch users that want to use C# instead of python). For instance I have several problems with this:
- C# is typed, are we sure we still want to hide types to TorchSharp users?
- C# users may find the Python-ish API weird to use
- Since we are mapping to C++ object we will have to surface some C# stuff anyway (e.g., object disposal)
from torchsharp.
A similar project like keras sharp with multiple backends. I can try to include torchsharp soon.
https://github.com/deepakkumar1984/SiaNet/
from torchsharp.
This seems to be a recurring issue with libraries ported from other languages to .NET - what naming convention to use for the API?
There are two schools of thought:
- Keep close to the original library's naming conventions, even if they conflict with the .NET naming conventions, to make it easier to port code from samples and documentation into the new .NET library.
- Use the .NET naming conventions, making the library easier to use for .NET developers. These naming conventions convey information (e.g. property vs function vs field etc...) and when they are not followed code can become more difficult to read.
Both of these schools of thought are equally valid, but of course they conflict with each other. I think school of thought 1 is best for the early stages of the library, getting started, etc... but I think long term 2 is the best. Supporting both in parallel would be ideal though. It would be nice if there were some automated way to generate a .NET convention version of the API surface in parallel to the Python-style API.
As an aside, it's interesting to me that F# uses a naming convention more like Python (for historical reasons, given F# is based on the ML family of languages), but only for private methods within an implementation and for the F# standard library. Even for F# facing libraries written in F#, the recommended conventions for public facing APIs is to use the .NET convention, though that seems to be inconsistently followed in the wild.
from torchsharp.
Just to note that if I was starting this repo from scratch, I would make it part of SciSharp, and follow SciSharp's naming conventions (i.e. use PyTorch Python naming conventions)
But for now we will stick to the naming conventions we have here
from torchsharp.
This could be a good option! I also like the idea of using Keras API on top of ML.NET (how does that work?)
from torchsharp.
@interesaaat The author of KerasSharp doesn't response cesarsouza/keras-sharp#29 .
from torchsharp.
@deepakkumar1984 Could you add TensorFlow.NET as a backend?
from torchsharp.
from torchsharp.
Refer this thread, you will know how valuable it is. The most important is TensorFlow.NET can Build Graph -> Train -> Inference model in one library. @deepakkumar1984
from torchsharp.
from torchsharp.
Sure, cross-platform, run in CUDA.
from torchsharp.
I'm closing this as it's covered by #95
from torchsharp.
Related Issues (20)
- TorchSharp memory issue HOT 19
- torch.finfo(dtype).min is 0 when dtype is torch.float16 while in pytorch the min value is -65504.0 HOT 3
- Will TorchSharp support exporting ONNX models in the future? HOT 8
- Why is the torch.unique function private? HOT 1
- "Console.WriteLine" in "Dotnet Interactive" after catching "Tensor invalid -- empty handle" exception HOT 1
- tensor to array with shape HOT 6
- should `Tensor.grad` be a property instead of a method? HOT 1
- System.AccessViolationException Error when using TorchSharp HOT 6
- Missing support for Quantized models HOT 3
- optimizers maximize HOT 2
- data loaders cannot work with some linq methods like `First` HOT 2
- in `RemoveDisposeScope`, we can't assume that `DisposeScopeStack.Peek() == disposeScope` HOT 4
- equivalent of PyTorch `data` HOT 1
- warnings cannot be accessed in notebooks HOT 1
- TryLoadNativeLibraryFromFile shouldn't just swallow all exceptions
- Calls to NativeLibrary should not assume explicit paths
- In PyTorch, the `non_blocking` parameter of the `torch.to` method is not present in TorchSharp.
- How do I get the value of such an attribute, just for display purposes. HOT 4
- How to set default device type in torchsharp.
- expose lr scheduler fields HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from torchsharp.