- 博客(4)
- 收藏
- 关注
原创 问题:error: (-210:Unsupported format or combination of formats) in function ‘calcHist’
error
2023-01-11 17:42:36
770
2
原创 dice,准确率(Accuracy)、精确率(Precision)、召回率(Recall)、F值(F-Measure),PCC计算pytorch代码
具体的原理就不讲解了,直接上代码 label和predict都是one-hot 型 def compute_PCC(predicts,label): assert(predicts.shape==label.shape) PCC=[] for i in range(predicts.shape[1]): n = predicts.shape[0]*predicts.shape[2]*predicts.shape[3] TP = ((predicts[:
2020-09-09 17:24:42
2792
原创 python批量修改文件名,并且文件名长度对齐
python批量修改文件名,并且文件名长度对齐 import os path=r'E:\code\Datasets' filename_list=os.listdir(path) a=0 for i in filename_list: used_name=path+'\\'+filename_list[a] new_name=path+'\\'+str(a).zfill(3)+'.tif'#文件名长度对齐 os.rename(used_name,new_name) a+=1
2020-08-20 16:06:22
578
原创 python打印水仙花数
Python打印水仙花数 方法一 for i in range(100,1000): sum=0 temp=i while temp: sum=sum+(temp%10)**3 temp//=10 if sum==i: print(i) 方法二` num=[] for i in range(100,1000): a=i//100 b=(i-a*100)//10 c=i-a*100-b*10 if (i==a**3+b**3+c**3): num.append(i) print(num) `
2020-05-11 16:56:58
309
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人
RSS订阅