With TensorBoard directly integrated in VS Code, you can spot check your models predictions, view the architecture of your model, analyze your model's loss and accuracy over time, and profile your code to find out where it's the slowest. TensorBoard is a data science companion dashboard that helps PyTorch and TensorFlow developers visualize datasets and model training. Using the panel, you can either use the input box to programmatically specify your slice using Python slice syntax or you can use the interactive Axis and Index dropdowns to slice as well.Īlong with slicing, you can search for values of interest such as "inf's" or "NaN's" by searching for those keywords in the filter under each column name. If you have three-dimensional or greater data (numpy ndarray, PyTorch Tensor, or TensorFlow EagerTensor types) a data slicing panel will open in the Data Viewer by default. Or you can open it from a Python debugging session by right-clicking any Tensor variable in the debugger and selecting View Value in Data Viewer.
You'll also notice that the Variable Explorer shows the shape/dimensions of the Tensor as well. To access the Data Viewer, you can open it from the Notebook Variable Explorer by clicking the Data Viewer icon that shows up beside any Tensor variable. Along with that the Data Viewer has support for slicing data, allowing you to view any 2D slice of your higher dimensional data. VS Code provides a Data Viewer that allows you to explore the variables within your code and notebooks, including PyTorch and TensorFlow Tensor data types. Data Viewer support for Tensors and data slices If you're unfamiliar with PyTorch development, Microsoft Learn offers a Get started with PyTorch learning path that covers the fundamentals of deep learning with PyTorch. This article covers some of those features and illustrates how they can help you in your projects. Configure IntelliSense for cross-compilingĮdit PyTorch support in Visual Studio CodeĪlong with support for Jupyter Notebooks, Visual Studio Code offers many features of particular interest for PyTorch developers.