snippets
nuttee
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
pytorch扩展权限问题: [cpp_ext] tmp build dir permission issue
问题详见:issue34238用户在使用torch.utils.cpp_extension.load调用自己的torch扩展时,pytorch默认会在linux的tmp/torch_extension目录下编译,但是当系统中多用户使用该扩展时会产生冲突,系统会对/tmp/torch_extension/$your_extension文件夹上锁,导致另一个用户无法因为权限问题使用。该issue已经在torch1.6及其更高版本中被解决commit/13013848d58a606da7377affeb4原创 2020-08-13 20:56:20 · 1151 阅读 · 0 评论 -
WSL2 Input/output error
解决方案1:重启wslwsl --shutdownwsl解决方案2重新挂载C盘sudo umount /mnt/csudo mount -t drvfs C:\\ /mnt/cReferences:WSL issue 4377原创 2020-07-13 09:57:33 · 3478 阅读 · 1 评论 -
WSL2 桌面GUI
WSL新升级为了WSL2,可是却遇到GLFW无法打开可视化界面的问题,原来是之前设置的环境变量DISPLAY=0:0或者DISPLAY=localhost:0在新的WSL2不适用,应该将网络地址改为win10下面的局域网地址,ipcinfig看一下自己的ip地址,设置新的环境变量即可。https://autoize.com/xfce4-desktop-environment-and-x-server-for-ubuntu-on-wsl-2/...原创 2020-07-07 17:03:00 · 6295 阅读 · 0 评论 -
Pytorch的若干非奇技淫巧
数据处理from skimage import ioimg = io.imread(filename, as_gray=True)注意这里as_gray=True返回的img其实是除以255的,所以范围是[0,1]import numpy as npimport torchxx, yy = np.meshgrid(np.arange(w), np.arange(h))yy, xx...原创 2020-04-23 17:36:10 · 497 阅读 · 0 评论 -
ImportError: TensorBoard logging requires TensorBoard with Python summary writer installed.
这是一次傻逼的经历,突然报如下错误,我以为是环境坏掉了,重装环境搞了半天,猜猜最后是什么原因?Traceback (most recent call last): File "/home/leerw/.local/lib/python3.6/site-packages/torch/utils/tensorboard/__init__.py", line 2, in <module>...原创 2020-04-09 18:32:05 · 3350 阅读 · 11 评论 -
PyTorch模型参数统计问题
PyTorch模型参数统计问题使用torchsummary使用torchsummary可以方便的统计模型的参数量from torchsummary import summarymodel = net().cuda()input_shape = (1,256,256)summary(model, input_size)即可打印出网络结构和参数统计但是有一个问题:对于共享参数的模块(...原创 2020-04-01 17:30:46 · 1867 阅读 · 9 评论
分享