-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
In the Last ML.NET Community Standup, we discussed the possibility of having a Keras Like API in C#. (YouTube Talk Link)
The goal is to have similar native C# API that can also take advantage of GPU and also being independent of Tensorflow Binding for DotNet for better performance scenarios.
Keras is simple and easy to use, Keras API in Python looks like this
network = models.Sequential()
network.add(layers.Dense(784, activation='relu', input_shape=(28 * 28,)))
network.add(layers.Dense(784, activation='relu', input_shape=(28 * 28,)))
network.add(layers.Dense(10, activation='softmax'))
network.compile(optimizer='adam',
loss='categorical_crossentropy',
metrics=['accuracy'])
Most of us are aware of the community bindings and libraries like Tensorflow.Net etc to name a few but for high-performance scenarios, these libraries seem to struggle (i guess mainly due to Interop Cost)
In my case, with Unity Engine using MLAgent which also depend on TF(Tensorflow).
Now in Unity for vision-based experiments ie. with convolutional NN based problems, Unity struggles a bit because each frame of the game they need to send pixel data to TF, which is performance costly, now if we had a similar good implementation of Neural Network in C#, Unity can also get performance improvements around 2 to 4 times (maybe), at least in iteration times.
I request ML.NET Team to create a survey regarding this, so we can share our challenges and use cases and necessity to have a Keras like API.
Thank You.