Writing CNTK Programs using the VS Code Editor

The Microsoft CNTK framework/library is a collection of powerful functions that you can use to write deep learning systems, for example, a deep neural network classifier. The most common way to use CNTK is to write a Python language program which calls into the CNTK functions.

So, to write a CNTK program, you’re really writing a Python program. Somewhat weirdly, to edit a Python+CNTK program, my technique of choice is to use Notepad. Yes, plain old Notepad, as in just about the simplest text editor imaginable.

I’ve never quite found a fancy Python editor with debugger that I really like. But I keep trying different Python editors — there are dozens. The other day, I revisited the Visual Studio Code (VS Code) program. VS Code is sort of like a scaled down, simplified version of the Visual Studio (VS) program. Note that the similarity in names — Visual Studio Code vs. Visual Studio, and VS Code vs. VS — has caused quite a bit of confusion.

VS Code is a free, open source, cross-platform, multiple-language, programming editor and debugger. Contrary to what some references state, VS Code is definitely not a lightweight program — it has a significant learning curve (but nothing like the beast that is Visual Studio).

Well, the bottom line is that I really like VS Code a lot. I could list all sorts of technical pros and cons of VS Code relative to other Python+CNTK programming environments, but the reality is that subjective factors are always more important. Basically, VS Code just feels right.

Note that for some complex scenarios (such as integrating CNTK code with Azure Cloud storage), you probably need something like the full Visual Studio with the Visual Studio Tools for AI add-on extension. But for simple scenarios, VS Code may be a good choice. See https://code.visualstudio.com/. VS Code also supports the new Visual Studio Tools for AI extension.


“Venice Twilight” (1908) – Claude Monet. Impressionism is simple but powerful.

This entry was posted in Machine Learning, Miscellaneous. Bookmark the permalink.