上传者: 38706603
|
上传时间: 2021-11-20 19:43:20
|
文件大小: 26KB
|
文件类型: -
mIou
import torch
import numpy as np
def Iou(input,target,classNum):
'''
:param input: [b,h,w]
:param target: [b,h,w]
:param classNum: scalar
:return:
'''
inputTmp = torch.zeros([input.shape[0],classNum,input.shape[1],input.shape[2]])#创建[b,c,h,w]大小的0矩阵
targetTmp = to