What does HackerNews think of pythonnet?
Python for .NET is a package that gives Python programmers nearly seamless integration with the .NET Common Language Runtime (CLR) and provides a powerful application scripting tool for .NET developers.
I guess this is sort of an ad.
Swift was a weird choice for statically typed TensorFlow, being only popular on the platform, that does not have GPU/TPU support in TensorFlow, which is, basically, a requirement for any serious work. The fact, that they had to fork the compiler did not help either.
TensorFlow for C# is much like TensorFlow for Swift. There's a statically typed binding to the core types with the rest of the TensorFlow API available through an open source Python.NET project [1]. Unlike Swift version though, that second part is also mostly statically typed, so you can get IDE autocompletion hints. Also, .NET runtime has native support for dynamic languages.
Like with Swift for TensorFlow, we ported all recent interesting neural network architectures (and maybe even more): Transformers (GPT-2) [2], CNNs (YOLOv4) [3], Q-learning (e.g. RL, actor-critic) [4], and even some cool ones, that have lots of unexplored potential like Siren [5] (this one uses sin/cos as activation functions).
Although we have not worked on automatic differentiation yet, unlike Swift, it will not need compiler support. .NET (and Java) can inspect and generate code at runtime, so autodiff can be implemented in a library.
We also have integration with Unity ML Agents for training robotic agents [4].
[1] https://github.com/pythonnet/pythonnet/
[2] https://github.com/losttech/Gradient-Samples/tree/master/GPT...
[3] https://github.com/losttech/YOLOv4
[4] https://github.com/losttech/Gradient-Samples/tree/master/RL-...
[5] https://github.com/losttech/Siren https://vsitzmann.github.io/siren/
It makes calling C# as easy as:
import clr
import System
uri = System.Uri('http://python.org')
And also works the other way around. In both cases you have to mind GIL though.