- 博客(2)
- 收藏
- 关注
原创 linux常用命令
查看文件夹内文件总数 ls -l |grep ^-|wc -l按KB M G 显示文件大小 ll -h查看系统存储大小 df -hl查看系统资源使用情况 top查找文件 find / -name 'interfaces'查看隐藏文件 ls -d .*nohup 命令 &定时执行命令 watch -n 1 -d 命令查看当前目录总大小 du ...
2018-08-10 16:07:58
137
原创 Pytorch中使用样本权重(sample_weight)的正确方式
step:1.将标签转换为one-hot形式。2.将每一个one-hot标签中的1改为预设样本权重的值即可在Pytorch中使用样本权重。eg:对于单个样本:loss = - Q * log(P),如下:P = [0.1,0.2,0.4,0.3]Q = [0,0,1,0]loss = -Q * np.log(P)增加样本权重则为loss = - Q * log(P) *sample_weigh
2018-01-18 23:51:11
18913
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人