摘要:前言 1. torch.where 返回满足条件的x/y; The tensors condition, x, y must be broadcastable. 注意,不同pytorch版本的输入输出数据类型有可能不同。1.6版本x/y输入类型只有Tensor,1.9版本是Tensor or Sca
阅读全文
摘要:前言 tensorboard可以对很多数据等进行可视化,比如Scalar(s)/ image(s)/ histogram/ figure/ video/ audio/ text/ graph/ PR/ mash等等。 1. 模块导入 from torch.utils.tensorboard impo
阅读全文
摘要:准确率/精确率/召回率/查准率/查全率/真正率/假正率。。 TP/TN/FP/FN/TPR/FPR F1-Score PR:Precision-Recall ROC:TPR-FPR AUC:ROC; 准确率 Accuracy 正确分类的样本数与总样本数之比(预测对的总样本 / 总总样本数) 精确率
阅读全文
摘要:参考 1. git error: failed to push some refs to remote; 完
阅读全文
摘要:也就是说,action='store_true',只要运行时该变量有传参就将该变量设为True。 Note:有default值的时候,running时不声明就为默认值, 没有的话,如果是store_false,则默认值是True,如果是store_true,则默认值是False; 实在记不住搞混的话
阅读全文
摘要:ldd不是一个可执行程序,而只是一个shell脚本 在linux环境下,c++编译得到库文件后缀包括:.so or .a or .la,当然,linux下文件的类型是不依赖于其后缀名的,后缀及其含义:.so 为共享库 : 动态库(shared library/shared object/dynami
阅读全文
摘要:code import torch chpt = torch.load('./CP_epoch1.pth') # epoch = chpt['epoch'] # loss = chpt['loss'] for k, v in chpt.items(): print(k, v) output(): i
阅读全文
摘要:clone code: git clone git@gitlab.xxx.yy:zzz/IPM_Semantic.git 我们在使用 git clone + 远程仓库地址将项目下载下来之后,倘若远程仓库有多个分支,我们会发现,使用git branch查看本地分支时,只有一个master分支。 $ g
阅读全文
摘要:step1: gitlab,生成gitlab网站的公钥私钥; $ ssh-keygen -t rsa -C xxx.yy@zzz.com Generating public/private rsa key pair. Enter file in which to save the key (/c/U
阅读全文