python valueerror函数使用_python – 具有张量流的语义分段 – 损失函数中的ValueError(稀疏 – softmax)...
我的输入图像数据暂时是750x750x3RGB图像.在通过网络运行后,我使用shape[batch_size,750,2]的logits进行损失计算.这是一个二进制分类–我这里有两个类,[0,1]在我的标签中(形状[batch_sizex750x750].这些进入损失函数,如下:defloss(logits,labels,num_classes):withtf.name_scope('lossmi