ok, so fwd pass seems ok, problem is with backward pass, was taking prior[img] instead of prior[label[img]]
so what exactly does the prior used in backward pass look like?
prior in bckwd pass fucked up. cpu_data probably points to smth completely different to at the end of fwd pass. making _prior a class attrib of the layer. hopefully syntax correct
computing prior again in backward pass
sbl forward and backward seem to work, now it's the weight update that's wrong. still need to figure that out; in the meantime, here is sbl without couts I think