英文:
Good way to view matrices and higher dimensional arrays in VScode
问题
在使用PyTorch/numpy和类似的包时,是否有一种好的方式在调试模式下查看矩阵(或者一般情况下,具有两个或更多维度的数组),类似于Matlab(甚至是pyCharm,如果我没记错的话)的呈现方式?
例如,这是一个PyTorch张量,非常令人困惑 - 在这里打开H
会一次又一次地给我同样的东西。
对此将不胜感激!
1: https://i.stack.imgur.com/DS7Pm.png
2: https://i.stack.imgur.com/bcfEM.png
英文:
When working with PyTorch/numpy and similar packages, is there a good way to view matrices (or, in general, arrays with two or more dimensions) in debug mode, similar to the way Matlab (or even pyCharm if I remember correctly) present it?
This is, for example, a PyTorch tensor, which is very confusing -- opening H
here gives me the same thing again and again.
As opposed to Matlab, where I can watch it like that:
Would appreciate any help with that!
答案1
得分: 2
确保已安装Jupyter扩展,然后只需在调试菜单中右键单击变量,选择“在数据查看器中查看值”选项。
英文:
Yes, make sure you have the Jupyter extension installed and then simply right click the variable in the Debug menu and select the View Value in Data Viewer
option.
答案2
得分: 0
从Jupyter Notebook内部,点击"Variables",然后在变量左侧有一个小图标,悬停鼠标会显示"在数据查看器中显示变量快照"的工具提示。
英文:
From within a Jupyter Notebook click Variables then there's a little icon to the left of the variable with a tooltip that says 'Show variable snapshot in data viewer'
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论