Using Deep Learning in ML.NET

Learn how deep learning is used in ML.NET.

In ML.NET, deep learning functionality is abstracted away by easy-to-use APIs, so developers don’t have to build and configure their own ANNs. We don’t need to decide how many nodes we need to place in the input layer. We don’t have to worry about the depth and width of the hidden layers either.

ML.NET achieves this by utilizing other open-source ML technology. By default, it uses either TensorFlow or PyTorch, depending on the task type. This is how it works under the hood:

  • The model is built by using TensorFlow or PyTorch.

  • ML.NET provides a method to access the model for consumption.

  • ML.NET provides a method to access the model for training and retraining.

The training process is quick because ML.NET uses a partially trained model in its deep learning APIs. We don’t need a large dataset that would normally be used to train such a model. Likewise, we don’t need to define the structure of the neural network because it is already provided to us.

Deep learning setup example

The following playground provides an example of how deep learning works in ML.NET and how its complexity is abstracted away by various APIs. This project was autogenerated by ML.NET Model Builder in Visual Studio, and it represents an image classification model.

Get hands-on with 1200+ tech skills courses.