I\'m trying to use the kappa loss function described in the answer How to do Cohen Kappa Quadratic Loss in Tensorflow 2.0? , to resolve a 3D voxelwise image classification p