给定points和它们的coords,指定一个reduce策略(mean或者max),voxel设定已初始化在类中,输出这些point features所对应的voxel的features,即将同一个voxel的point的features按照reduce策略得到该voxel的feature.将这两步操作配合使用,中间夹一个vfe layer的forward,也就实现了无voxel组织情况下vfe layer对point features的extra...
因为一般损失函数都是直接计算 batch 的数据,因此返回的 loss 结果都是维度为 (batch_size, ) 的向量。 如果reduce = False,那么 size_average 参数失效,直接返回向量形式的 loss 如果reduce = True,那么 loss 返回的是标量 AI检测代码解析 a)如果 size_average = True,返回 loss.mean(); b)如果 size_avera...
reduction (str, optional): The method to reduce the loss. Options are "none", "mean" and "sum". loss_weight (float, optional): The weight of loss. """ def__init__(self,reduction='mean',loss_weight=1.0): super(L1Loss,self).__init__() self.reduction=reduction self.loss_weight=l...