the labels matrix that was supposed to 0 out the coordinates corresponding to other classes (non ground truth classes) was only applied to outputs and not abs(outputs-target)
the mean was found by dividing the sum of losses by the number of ones in the labels matrix, but that has 1 for each coordinate rather than each object, so the labels matrix was switched out for labels target
2 main edits: