随笔分类 - 工具
摘要:Step Over:单步执行时,将子函数整个作为一步执行完再停止。在不存在子函数的情况下是和Step Into效果一样的。(子函数执行不显示)Step Into:单步执行,遇到子函数就进入并且继续单步执行。(每步都显示)Step Into My Code:进入自己编写的函数,不进入系统函数。(可直接
阅读全文
摘要:前两天登录Linux时,发现分辨率突然变小了很多。并且识别不出来显卡了,具体表现为输入nvidia-smi后报错:NVIDIA-SMI has failed because it couldn‘t communicate with the NVIDIA driver 网上查询发现是:系统升级导致内核
阅读全文
摘要:Git使用笔记 一、Git基本操作 git顺序 git pull --> git add xxx.py --> git commit –m “xxx” --> git push origin master:refs/for/master git commit提交指定文件的两种方式 1. 将指定文件添
阅读全文
摘要:1 echo -n "start time " > time 2 date >> time 3 4 python3 main.py \ 5 --batch-size=64 \ 6 --arch=resnet50 \ 7 --workers 6 \ 8 --epochs=1 \ 9 --gpu=0 \
阅读全文
摘要:1. 安装 libtiff 处理气象栅格数据时,需要读取 tiff 格式的数据。经查阅可使用 libtiff 这个库来读取 使用方法: from libtiff import TIFF tif = TIFF.open('filename.tif', mode='r') img = tif.read_
阅读全文
摘要:参考博客: https://blog.csdn.net/u011276025/article/details/73826562/ 1. 把Label要转成LongTensor格式 self.y = torch.LongTensor(y) 完整使用代码如下: 1 class ImgDataset(Da
阅读全文
摘要:配国内镜像 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple xxx conda配国内镜像: conda install -c https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
阅读全文
摘要:检查使用的GPU的索引 torch.cuda.is_available() cuda是否可用; torch.cuda.device_count() 返回gpu数量; torch.cuda.get_device_name(0) 返回gpu名字,设备索引默认从0开始; torch.cuda.curren
阅读全文
摘要:元素初始化时, sess.run(tf.initialize_all_variables()) 会报 module 'tensorflow' has no attribute 'initialize_all_variables' 按网上博客中说的改成global_variables_initiali
阅读全文

浙公网安备 33010602011771号