CNTK Examples
The Tutorials/ and
Examples/ folders
contain a variety of example configurations for CNTK networks using the
Python API, C# and BrainScript.
The examples are structured by topic into Image, Language Understanding,
Speech, and so forth. To get started with CNTK we recommend the tutorials in
the Tutorials
folder.
Python Examples
The best way to learn about the APIs is to look at the following examples in the [CNTK clone root]/Examples directory:
- MNIST: A fully connected feed-forward model for classification of MNIST images. (follow the instructions in Examples/Image/DataSets/MNIST/README.md)
- TrainResNet_CIFAR10: An image classification ResNet model for training on the CIFAR image dataset. (follow the instructions in Examples/Image/DataSets/CIFAR-10/README.md to get the CIFAR dataset and convert it to the CNTK supported format)
- ReinforcementLearning: Reinforcement learning with Deep Q Neural Networks (DQN).
- SequenceClassification: An LSTM sequence classification model for text data.
- Sequence2Sequence: A sequence to sequence grapheme-to-phoneme translation model that trains on the CMUDict corpus.
- NumpyInterop - NumPy interoperability example showing how to train a simple feed-forward network with training data fed using NumPy arrays.
- LanguageUnderstanding - Language Understanding.
- CharacterLM: An LSTM character-level language model to predict the next output character in a sequence.
- LightRNN: Implementation of LightRNN in CNTK.
- WordLMWithSampledSoftmax: A word-level language model with sampled softmax.
- Video - Basic 3D convolution networks for deep learning on video tasks.
An overview on all examples and tutorials is also provided by the Cognitive Toolkit Model Gallery page.
C# Examples
The CNTK Training with C# Examples page provides examples showing how to build, train, and validate DNN models.
Evaluation Examples
The CNTK Eval Examples page provides examples demonstrating how to evaluate pre-trained models using C++, C#/.NET, Python, and Java.