The Microsoft CNTK v 2.0 is a code library for deep neural networks. The library is written in C++ but you use CNTK by writing a Python program that calls into the CNTK functions.
I took a look at the documentation example for a long short-term memory (LSTM) recurrent neural network. When I want to understand a library, my first step is to get a program to run. After that, I can start experimenting with the program. That’s the most effective approach for me anyway.
The CNTK example was written as a IPYNB (interactive Python notebook) file. I much prefer ordinary Python programs, so I set out to refactor the notebook code to plain Python.
It took me about an hour but I eventually got the LSTM network demo running. The first part of the example generates data using the sine function:
The second part of the example creates, trains, and evaluates a LSTM prediction model:
OK, so I got the example running, but at this point I have pretty much zero understanding of what’s going on. But I’ve made the first step.


.NET Test Automation Recipes
Software Testing
SciPy Programming Succinctly
Keras Succinctly
R Programming
2026 Visual Studio Live
2025 Summer MLADS Conference
2026 DevIntersection Conference
2025 Machine Learning Week
2025 Ai4 Conference
2026 G2E Conference
2026 iSC West Conference
You must be logged in to post a comment.