1 | for branch in `git branch -a | sed -n '\=/HEAD$=d; \=/master$=d;s= remotes/==p'`; do |
git stash使用
发表于 | 阅读次数:
git stash
把commit放入到一个list里面
git apply
可以多次使用
git pop
只能使用一次
git 放弃本地修改
发表于 | 阅读次数:
1 | git checkout . && git clean -df |
git 回退远程commit
发表于 | 阅读次数:
1 | git checkout master |
pytorch tensor类型转换
发表于 | 阅读次数:
1 | a.int() # in place op |
图像中的h,w 和 keypoint xy
读入是h, w;
x y 又是/w /h;
然后索引的时候又是y x mask[bdx, 0, miny: maxy+1, minx: maxx+1] = 1
为了避免下次再遇到这个错误,一律使用w1, h1。
plot.py
发表于 | 阅读次数:
1 | # -*- coding: utf-8 -*- |
plt画灰度图
发表于 | 阅读次数:
1 | plt.imshow(img, cmap ='gray') |
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xab in position 133: invalid start byte
发表于 | 阅读次数:
1 | with open(path, 'rb') as f: |
list无法变成numpy
发表于 | 阅读次数:
原因是list的shape不一样