Code-OSS是VSCode在嵌入式平台上版本
下载GitHub上的一个release版本
(1)打开 Code-OSS, 点击扩展Extensions,搜索python ,然后install; (2)ctrl+shift+p 搜索Select interpreter 选择python3.6.x (3)ctrl+鼠标滚轮控制字体大小(个人习惯) Files–Preference–Settings–Text Editor–Edit in settings.json
{ "editor.mouseWheelZoom": true }(4)pylint的no-member报错,但不影响运行: 同样打开settings.json,填写
{ "editor.mouseWheelZoom": true, "python.linting.pylintArgs": ["--generated-members"] }转载自博客
查看空间
free转自博客 主要是安装torch2trt详见readme
git clone https://github.com/NVIDIA-AI-IOT/torch2trt cd torch2trt python setup.py install上面博主修改的demo直接摘过来,哈哈:
from torch2trt import * import torch from torchvision.models import * device = torch.device("cuda" if torch.cuda.is_available() else "cpu") #随便加个模型,加载好参数 model_org = resnet18(pretrained=True) model_org.to(device) model_org.eval() #这步需要 test1 = torch.rand(1,3,224,224).to(device) #一定要设max_workspace_size,否则会报空间不足的错误 #fp16_mode精度高一些,int8_mode精度不太好,但是速度快 model = torch2trt(model_org, [test1], fp16_mode=True, max_workspace_size=100) model.eval() #第一次推断耗时较长 test2 = model(test1.cuda()) ...参考 screen -S name 启动一个名字为name的screen screen -S name -X quit 删除某个session 或者当前下ctrl+a->k->y screen -ls 是列出所有的screen screen -r name或者id,就可以回到某个screen了(如不行先detached: screen -d name) ctrl + a + d 可以回到前一个screen,当时在当前screen运行的程序不会停止
参考。包括单目、双目、人脸识别