Changed to chunked median filter input test case & (possibly) fixed grad error metric output