常用工程技术积累-(6)

删除anaconda环境命令

conda env remove –n (虚拟环境名字) --all

清楚conda环境占用的不需要的安装包

在这里插入图片描述
参考链接1

linux查看进程号

ps -ef

Linux查看磁盘空间

df -ith
在这里插入图片描述

pytorch str转float,通过map函数

参考链接2

output_string = list(map(eval, input_string))

torch tensor相关操作

torch.pow()
torch.sum()
torch.nn.functional.normalize()

torch.frobenius_norm

#print(torch.mean(torch.norm(a-b, dim=-1)))
#print(torch.mean(torch.frobenius_norm(a - b, dim=-1)))
结果一样
torch1.11主要用torch.norm()

版权声明:本文为david8766原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。